{"id":"CVE-2025-54387","state":"PUBLISHED","title":"IPX is Vulnerable to Path Traversal via Prefix Matching Bypass","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.","publishedAt":"2025-08-05T00:10:26.442Z","updatedAt":"2025-08-05T14:11:59.162Z","severity":{"score":6.9,"label":"Medium","version":"4.0","vector":"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","source":"GitHub_M"},"assigner":"GitHub_M","products":["unjs ipx"],"affected":[{"vendor":"unjs","product":"ipx","versions":[{"version":"< 1.3.2","status":"affected"},{"version":">= 2.0.0-0, < 2.1.1","status":"affected"},{"version":">= 3.0.0, < 3.1.1","status":"affected"}]}],"references":["https://github.com/unjs/ipx/security/advisories/GHSA-mm3p-j368-7jcr","https://github.com/unjs/ipx/commit/81693ddbfc062cc922e4e2406e8427ab4e3ad214","https://github.com/unjs/ipx/releases/tag/v1.3.2","https://github.com/unjs/ipx/releases/tag/v2.1.1","https://github.com/unjs/ipx/releases/tag/v3.1.1"],"weaknesses":["CWE-22"],"ingestedAt":"2026-10-29T20:09:31.862Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/54xxx/CVE-2025-54387.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2025-54387","state":"PUBLISHED","datePublished":"2025-08-05T00:10:26.442Z","dateUpdated":"2025-08-05T14:11:59.162Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2025-07-21T16:12:20.734Z"},"containers":{"cna":{"title":"IPX is Vulnerable to Path Traversal via Prefix Matching Bypass","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"unjs","product":"ipx","versions":[{"version":"< 1.3.2","status":"affected"},{"version":">= 2.0.0-0, < 2.1.1","status":"affected"},{"version":">= 3.0.0, < 3.1.1","status":"affected"}]}],"references":[{"url":"https://github.com/unjs/ipx/security/advisories/GHSA-mm3p-j368-7jcr","name":"https://github.com/unjs/ipx/security/advisories/GHSA-mm3p-j368-7jcr","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/unjs/ipx/commit/81693ddbfc062cc922e4e2406e8427ab4e3ad214","name":"https://github.com/unjs/ipx/commit/81693ddbfc062cc922e4e2406e8427ab4e3ad214","tags":["x_refsource_MISC"]},{"url":"https://github.com/unjs/ipx/releases/tag/v1.3.2","name":"https://github.com/unjs/ipx/releases/tag/v1.3.2","tags":["x_refsource_MISC"]},{"url":"https://github.com/unjs/ipx/releases/tag/v2.1.1","name":"https://github.com/unjs/ipx/releases/tag/v2.1.1","tags":["x_refsource_MISC"]},{"url":"https://github.com/unjs/ipx/releases/tag/v3.1.1","name":"https://github.com/unjs/ipx/releases/tag/v3.1.1","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"NONE","vulnAvailabilityImpact":"NONE","subConfidentialityImpact":"HIGH","subIntegrityImpact":"LOW","subAvailabilityImpact":"NONE","baseScore":6.9,"baseSeverity":"MEDIUM","vectorString":"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","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","lang":"en","description":"CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2025-08-05T00:10:26.442Z"},"source":{"advisory":"GHSA-mm3p-j368-7jcr","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/unjs/ipx/security/advisories/GHSA-mm3p-j368-7jcr","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2025-08-05T14:11:56.190437Z","id":"CVE-2025-54387","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-08-05T14:11:59.162Z"}}]}}}