{"id":"CVE-2025-54387","summary":"IPX is Vulnerable to Path Traversal via Prefix Matching Bypass","details":"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.","aliases":["GHSA-mm3p-j368-7jcr"],"modified":"2026-07-15T01:49:12.434188245Z","published":"2025-08-05T00:10:26.442Z","database_specific":{"cwe_ids":["CWE-22"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/54xxx/CVE-2025-54387.json","cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://github.com/unjs/ipx/releases/tag/v1.3.2"},{"type":"WEB","url":"https://github.com/unjs/ipx/releases/tag/v2.1.1"},{"type":"WEB","url":"https://github.com/unjs/ipx/releases/tag/v3.1.1"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/54xxx/CVE-2025-54387.json"},{"type":"ADVISORY","url":"https://github.com/unjs/ipx/security/advisories/GHSA-mm3p-j368-7jcr"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-54387"},{"type":"FIX","url":"https://github.com/unjs/ipx/commit/81693ddbfc062cc922e4e2406e8427ab4e3ad214"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/unjs/ipx","events":[{"introduced":"0"},{"fixed":"2785c3dfabc6fd4e3918c54fd88c93c6c1efbf88"},{"introduced":"3bddd8af0ae090cabf0ab3fd695833b702e5936f"},{"fixed":"36537bc1395854a57a34ab6aeecb5debfcb02ae1"},{"introduced":"b262ce0725355c766ce5d7d1f8593b093ef52af7"},{"fixed":"562ea7e44ebde1200d056f7f2ff900b36d5ec3c7"},{"fixed":"81693ddbfc062cc922e4e2406e8427ab4e3ad214"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"fixed":"1.3.2"},{"introduced":"2.0.0"},{"fixed":"2.1.1"},{"introduced":"3.0.0"},{"fixed":"3.1.1"}],"source":["CPE_RANGE","REFERENCES"],"cpe":"cpe:2.3:a:unjs:ipx:*:*:*:*:*:node.js:*:*"}}],"versions":["v1.3.1","v2.1.0","v3.1.0","v3.0.3","v3.0.2","v3.0.1","v3.0.1-0","v3.0.0","v2.0.2","v2.0.1","v2.0.0","v1.3.0","v1.2.0","v1.1.0","v1.0.1","v1.0.0","v1.0.0-2","v1.0.0-1","v1.0.0-0","v0.9.11","v0.9.10","v0.9.9","v0.9.8","v0.9.7","v0.9.6","v0.9.5","v0.9.4","v0.9.3","v0.9.2","v0.8.0","v0.9.1","v0.9.0","v0.7.2","v0.7.1","v0.7.0","v0.6.7","v0.6.6","v0.6.5","v0.6.4","v0.6.3","v0.6.2","v0.6.1","v0.6.0","v0.5.8","v0.5.7","v0.5.6","v0.5.5","v0.5.4","v0.5.3","v0.5.2","v0.5.1","v0.5.0","v0.4.8","v0.4.7","v0.4.6","v0.4.5","v0.4.4","v0.4.3","v0.4.2","v0.4.1","v0.4.0","ipx@0.3.1","ipx-client@0.5.1","ipx@0.3.0","ipx-client@0.5.0","v0.1.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-54387.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"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"}]}