{"answers":{"affected":"6 open source packages ship an affected version, including ipx. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-54387 exists.","fix":"Upgrade ipx to a fixed version for your release line: 1.3.2, 2.1.1 or 3.1.1.","what":"CVE-2025-54387 is a medium-severity path traversal vulnerability in unjs ipx, published on 5 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-54387 and fix it if it is affected.\n\nWhat it is: CVE-2025-54387 is a medium-severity path traversal vulnerability in unjs ipx, published on 5 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-54387 exists.\n\nAffected packages and fixed versions:\n- ipx (npm): affected all versions; fixed in 1.3.2\n- ipx (npm): affected all versions; fixed in 1.3.2\n- ipx (npm): affected from 2.0.0-0; fixed in 2.1.1\n- ipx (npm): affected from 2.0.0-0; fixed in 2.1.1\n- ipx (npm): affected from 3.0.0; fixed in 3.1.1\n- ipx (npm): affected from 3.0.0; fixed in 3.1.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-54387/ (Markdown: https://insights.sbomify.com/CVE-2025-54387/index.md)","id":"CVE-2025-54387","markdown":"https://insights.sbomify.com/CVE-2025-54387/index.md","name":"CVE-2025-54387","record":{"aliases":["GHSA-mm3p-j368-7jcr"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"IPX image optimizer","requires_auth":"none","summary":"Attackers can read files outside allowed directories in IPX due to a path prefix bypass vulnerability in directory checks.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"ipx","vendor":"unjs"}],"cvss":{"score":6.9,"severity":"medium","source":"cna","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","version":"4.0"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"IPX is Vulnerable to Path Traversal via Prefix Matching Bypass","id":"CVE-2025-54387","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2025"},"n_packages":6,"n_references":5,"next":{"headline":"Moby's Firewalld reload makes published container ports accessible from remote hosts","id":"CVE-2025-54388"},"packages":[{"ecosystem":"npm","fixed":["1.3.2"],"introduced":["0"],"last_affected":[],"package":"ipx","purl":null,"source":"GHSA-mm3p-j368-7jcr"},{"ecosystem":"npm","fixed":["1.3.2"],"introduced":["0"],"last_affected":[],"package":"ipx","purl":"pkg:npm/ipx","source":"GHSA-mm3p-j368-7jcr"},{"ecosystem":"npm","fixed":["2.1.1"],"introduced":["2.0.0-0"],"last_affected":[],"package":"ipx","purl":null,"source":"GHSA-mm3p-j368-7jcr"},{"ecosystem":"npm","fixed":["2.1.1"],"introduced":["2.0.0-0"],"last_affected":[],"package":"ipx","purl":"pkg:npm/ipx","source":"GHSA-mm3p-j368-7jcr"},{"ecosystem":"npm","fixed":["3.1.1"],"introduced":["3.0.0"],"last_affected":[],"package":"ipx","purl":null,"source":"GHSA-mm3p-j368-7jcr"},{"ecosystem":"npm","fixed":["3.1.1"],"introduced":["3.0.0"],"last_affected":[],"package":"ipx","purl":"pkg:npm/ipx","source":"GHSA-mm3p-j368-7jcr"}],"prev":{"headline":"Traefik's Client Plugin is Vulnerable to Path Traversal, Arbitrary File Overwrites and Remote Code Execution","id":"CVE-2025-54386"},"products":["ipx"],"published":"2025-08-05","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-08-05","vendors":["unjs"]},"summary":"Attackers can read files outside allowed directories in IPX due to a path prefix bypass vulnerability in directory checks.","url":"https://insights.sbomify.com/CVE-2025-54387/"}