enhanced-resolve is vulnerable to Path Traversal
30
Low Risk
The RestrictionsPlugin in enhanced-resolve confines module resolution to configured restrictions paths using an isInside containment check. That check treats a backslash as a path separator on every platform, so on posix systems a resolved path that begins with a restriction string followed by a backslash is accepted even though it names a sibling outside the restricted directory. This lets resolution succeed for files outside the intended boundary, defeating the confinement the restrictions option is meant to enforce. The fix aligns containment with path.win32 and path.posix semantics so a backslash stays an ordinary filename character on posix and the boundary is enforced correctly.
You are affected if you are using a version that falls within the vulnerable range and you configure the restrictions option with string path prefixes to confine module resolution.
enhanced-resolve is vulnerable to Path Traversal in versions 4.2.0 - 5.24.3.
Upgrade the enhanced-resolve library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant