{"answers":{"affected":"3 open source packages ship an affected version, including chainguard.dev/apko. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-25121 in the wild and no public exploit code.","fix":"Upgrade chainguard.dev/apko to 1.1.0 or later.","what":"CVE-2026-25121 is a high-severity path traversal vulnerability in chainguard-dev apko, published on 4 Feb 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-25121 and fix it if it is affected.\n\nWhat it is: CVE-2026-25121 is a high-severity path traversal vulnerability in chainguard-dev apko, published on 4 Feb 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-25121 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- chainguard.dev/apko (Go): affected from 0.14.8; fixed in 1.1.0\n- chainguard.dev/apko (Go): affected from 0.14.8; fixed in 1.1.0\n- chainguard.dev/apko (Go): affected from 0.14.8; fixed in 1.1.0\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-2026-25121/ (Markdown: https://insights.sbomify.com/CVE-2026-25121/index.md)","id":"CVE-2026-25121","markdown":"https://insights.sbomify.com/CVE-2026-25121/index.md","name":"CVE-2026-25121","record":{"aliases":["GHSA-5g94-c2wx-8pxw","GO-2026-4405","MINI-fm7j-w2v8-v2mj"],"analysis":{"component_type":"container_or_infrastructure","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"OCI image builder","requires_auth":"none","summary":"Attackers can write files outside the intended directory via malicious APK packages, potentially compromising the build environment.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"apko","vendor":"chainguard"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-23","name":"Relative Path Traversal"}],"description":"apko allows users to build and publish OCI container images built from apk packages. From version 0.14.8 to before 1.1.1, a path traversal vulnerability was discovered in apko's dirFS filesystem abstraction. An attacker who can supply a malicious APK package (e.g., via a compromised or typosquatted repository) could create directories or symlinks outside the intended installation root. The MkdirAll, Mkdir, and Symlink methods in pkg/apk/fs/rwosfs.go use filepath.Join() without validating that the resulting path stays within the base directory. This issue has been patched in version 1.1.1.","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":"apko is vulnerable to path traversal in apko dirFS which allows filesystem writes outside base","id":"CVE-2026-25121","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":3,"n_references":2,"next":{"headline":"apko is vulnerable to unbounded resource consumption in expandapk.Split on attacker-controlled .apk streams","id":"CVE-2026-25122"},"packages":[{"ecosystem":"Go","fixed":["1.1.0"],"introduced":["0.14.8"],"last_affected":[],"package":"chainguard.dev/apko","purl":null,"source":"GHSA-5g94-c2wx-8pxw"},{"ecosystem":"Go","fixed":["1.1.0"],"introduced":["0.14.8"],"last_affected":[],"package":"chainguard.dev/apko","purl":"pkg:golang/chainguard.dev/apko","source":"GHSA-5g94-c2wx-8pxw"},{"ecosystem":"Go","fixed":["1.1.0"],"introduced":["0.14.8"],"last_affected":[],"package":"chainguard.dev/apko","purl":"pkg:golang/chainguard.dev/apko","source":"GO-2026-4405"}],"prev":{"headline":"Gogs Allows Cross-Repository Comment Deletion via DeleteComment","id":"CVE-2026-25120"},"products":["apko"],"published":"2026-02-04","related":[{"cvss_score":7.5,"headline":"apko affected by potential unbounded resource consumption in expandapk.ExpandApk on attacker-controlled .apk streams","id":"CVE-2026-25140","kev_date_added":null,"published":"2026-02-04"},{"cvss_score":5.5,"headline":"apko is vulnerable to unbounded resource consumption in expandapk.Split on attacker-controlled .apk streams","id":"CVE-2026-25122","kev_date_added":null,"published":"2026-02-04"}],"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":"yes","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-02-04","vendors":["chainguard-dev"]},"summary":"Attackers can write files outside the intended directory via malicious APK packages, potentially compromising the build environment.","url":"https://insights.sbomify.com/CVE-2026-25121/"}