{"answers":{"affected":"3 open source packages ship an affected version, including github.com/google/osv-scalibr. It affects 1 product.","exploited":"There is no known exploitation of CVE-2025-5981 in the wild and no public exploit code.","fix":"Upgrade github.com/google/osv-scalibr to 0.2.1 or later.","what":"CVE-2025-5981 is a medium-severity path traversal vulnerability in Google osv-scalibr, published on 18 Jun 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-5981 and fix it if it is affected.\n\nWhat it is: CVE-2025-5981 is a medium-severity path traversal vulnerability in Google osv-scalibr, published on 18 Jun 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2025-5981 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/google/osv-scalibr (Go): affected from 0.1.3; fixed in 0.2.1\n- github.com/google/osv-scalibr (Go): affected from 0.1.3; fixed in 0.2.1\n- github.com/google/osv-scalibr (Go): affected from 0.1.3; fixed in 0.2.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-5981/ (Markdown: https://insights.sbomify.com/CVE-2025-5981/index.md)","id":"CVE-2025-5981","markdown":"https://insights.sbomify.com/CVE-2025-5981/index.md","name":"CVE-2025-5981","record":{"aliases":["GHSA-2hcm-q3f4-fjgw","GO-2025-3767"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"OSV-SCALIBR scanner","requires_auth":"low_privilege","summary":"Attackers can write arbitrary files on the host system via path traversal when scanning untrusted container images with the remote-image flag.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Google","cpe":[{"product":"osv-scalibr","vendor":"google"}],"cvss":{"score":5.7,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:L/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"},{"id":"CWE-427","name":"Uncontrolled Search Path Element"}],"description":"Arbitrary file write as the OSV-SCALIBR user on the host system via a path traversal vulnerability when using OSV-SCALIBR's unpack() function for container images. Particularly, when using the CLI flag --remote-image on untrusted container images.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Arbitrary File write in OSV-SCALIBR","id":"CVE-2025-5981","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"path_traversal","year":"2025"},"n_packages":3,"n_references":2,"next":{"headline":"Insufficient Granularity of Access Control in GitLab","id":"CVE-2025-5982"},"packages":[{"ecosystem":"Go","fixed":["0.2.1"],"introduced":["0.1.3"],"last_affected":[],"package":"github.com/google/osv-scalibr","purl":null,"source":"GHSA-2hcm-q3f4-fjgw"},{"ecosystem":"Go","fixed":["0.2.1"],"introduced":["0.1.3"],"last_affected":[],"package":"github.com/google/osv-scalibr","purl":"pkg:golang/github.com/google/osv-scalibr","source":"GHSA-2hcm-q3f4-fjgw"},{"ecosystem":"Go","fixed":["0.2.1"],"introduced":["0.1.3"],"last_affected":[],"package":"github.com/google/osv-scalibr","purl":"pkg:golang/github.com/google/osv-scalibr","source":"GO-2025-3767"}],"prev":{"headline":"code-projects Restaurant Order System order.php sql injection","id":"CVE-2025-5980"},"products":["osv-scalibr"],"published":"2025-06-18","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":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"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":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-06-18","vendors":["Google"]},"summary":"Attackers can write arbitrary files on the host system via path traversal when scanning untrusted container images with the remote-image flag.","url":"https://insights.sbomify.com/CVE-2025-5981/"}