# CVE-2025-54387: IPX is Vulnerable to Path Traversal via Prefix Matching Bypass

- Severity: Medium 6.9 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.79%, higher than 57% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-08-04T14:48:25.000Z
- Modified: 2026-09-10T03:50:27.266Z
- Also known as: GHSA-mm3p-j368-7jcr
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

IPX is an image optimizer powered by sharp and svgo. In versions 1.3.1 and below, 2.0.0-0 through 2.1.0, and 3.0.0 through 3.1.0, 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. This is fixed in versions 1.3.2, 2.1.1 and 3.1.1.

(As written by CVE List.)

## Affected

- unjs ipx: < 1.3.2; >= 2.0.0-0, < 2.1.1; >= 3.0.0, < 3.1.1; before 1.3.2; from 2.0.0 before 2.1.1; from 3.0.0 before 3.1.1
- ipx (npm): before 1.3.2; from 2.0.0-0 before 2.1.1; from 3.0.0 before 3.1.1

## Every score

- GitHub_M: CVSS:4.0 6.9 Medium `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`
- GitHub: CVSS:4.0 Medium `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`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/unjs/ipx/security/advisories/GHSA-mm3p-j368-7jcr> (exploit, vendor-advisory, web)
- <https://github.com/unjs/ipx/commit/81693ddbfc062cc922e4e2406e8427ab4e3ad214> (patch, web)
- <https://github.com/unjs/ipx/releases/tag/v1.3.2> (release-notes, web)
- <https://github.com/unjs/ipx/releases/tag/v2.1.1> (release-notes, web)
- <https://github.com/unjs/ipx/releases/tag/v3.1.1> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-54387> (advisory)
- <https://github.com/unjs/ipx> (package)

## Sources

- CVE List: [CVE-2025-54387](https://www.cve.org/CVERecord?id=CVE-2025-54387), CVE Terms of Use, modified 2025-08-05
- GitHub Advisory Database: [GHSA-mm3p-j368-7jcr](https://github.com/advisories/GHSA-mm3p-j368-7jcr), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-54387](https://nvd.nist.gov/vuln/detail/CVE-2025-54387), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-54387 · Whole record: https://cve.day/CVE-2025-54387.json · Rebuilt by cve.day 2026-11-25T22:59:02.041Z
