Medium, CVSS 6.9npmAmendedPublished
IPX Allows Path Traversal via Prefix Matching Bypass
CVE-2025-54387 · GHSA-mm3p-j368-7jcr
- Affected
- npm ipx < 1.3.2; >= 2.0.0-0, < 2.1.1; >= 3.0.0, < 3.1.1
- Fixed in
- 3.1.12.1.11.3.2· Vendor fix available
- Issue
- The approach used to check whether a path is within allowed directories is vulnerable to path prefix bypass when the allowed directories do not end with a path separator. This occurs because the check relies on a raw string prefix comparison. PoC - setup - main.js - node main.js Impact Path Traversal Possible Fix Check if the dir ends with / (path separator) and if not, add before calling startsWith
Recommended action: Upgrade to 3.1.1, 2.1.1 or 1.3.2 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.