# CVE-2026-25121: apko is vulnerable to path traversal in apko dirFS which allows filesystem writes outside base

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.41%, higher than 37% of CVEs (2026-12-01)
- Published: 2026-02-03T23:57:48.000Z
- Modified: 2026-09-10T03:50:34.269Z
- Also known as: GHSA-5g94-c2wx-8pxw, GO-2026-4405
- Related: CGA-8rrf-mq5r-w436
- Weaknesses: CWE-22, CWE-23
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- chainguard-dev apko: >= 0.14.8, < 1.1.1
- chainguard.dev/apko (Go): from 0.14.8 before 1.1.0
- chainguard apko: from 0.14.8 before 1.1.1

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`

## References

- <https://github.com/chainguard-dev/apko/security/advisories/GHSA-5g94-c2wx-8pxw> (advisory, third-party-advisory, web)
- <https://github.com/chainguard-dev/apko/commit/d8b7887a968a527791b3c591ae83928cb49a9f14> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-25121> (advisory)
- <https://github.com/chainguard-dev/apko> (package)

## Sources

- CVE List: [CVE-2026-25121](https://www.cve.org/CVERecord?id=CVE-2026-25121), CVE Terms of Use, modified 2026-02-04
- GitHub Advisory Database: [GHSA-5g94-c2wx-8pxw](https://github.com/advisories/GHSA-5g94-c2wx-8pxw), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2026-4405](https://pkg.go.dev/vuln/GO-2026-4405), CC-BY-4.0, modified 2026-02-06
- NVD: [CVE-2026-25121](https://nvd.nist.gov/vuln/detail/CVE-2026-25121), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-25121 · Whole record: https://cve.day/CVE-2026-25121.json · Rebuilt by cve.day 2026-11-25T22:59:13.492Z
