publish-flat is vulnerable to Improper Input Validation
26
Low Risk
Affected versions of the package are vulnerable to regular expression injection due to the use of a user-controlled directory value when dynamically constructing a RegExp without proper escaping. By embedding the raw dirToFlatten value directly into a regular expression, an attacker can inject arbitrary regex fragments and influence matching behavior. Properly escaping all regex metacharacters before building dirToFlattenRegex preserves the intended semantics while preventing regex injection.
You are affected if you are using a version that falls within the vulnerable range.
publish-flat is vulnerable to Improper Input Validation in versions 1.0.0 - 1.17.0.
Upgrade the publish-flat library to the patch version.
Secure your code, cloud, and runtime environments in one central system. Find and fix vulnerabilities automatically.
No credit card required | Scan results in 32secs.
SOC 2Compliant
ISO 27001Compliant