7.5high
apko is vulnerable to path traversal in apko dirFS which allows filesystem writes outside base
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.41% (higher than 37% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-5g94-c2wx-8pxwGO-2026-4405
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| chainguard-dev apko | >= 0.14.8, < 1.1.1 | CVE List |
| chainguard.dev/apko (Go) | from 0.14.8 before 1.1.0 | GitHub Advisory Database, Go Vulnerability Database |
| chainguard apko | from 0.14.8 before 1.1.1 | NVD |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
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.
Fix: Fixed by d8b7887. Merged into release.
Acknowledgements
apko thanks Oleh Konko from 1seal for discovering and reporting this issue.
Go Vulnerability Database
apko has a path traversal in apko dirFS which allows filesystem writes outside base in chainguard.dev/apko
NVD (es)
apko permite a los usuarios construir y publicar imágenes de contenedor OCI construidas a partir de paquetes apk. Desde la versión 0.14.8 hasta antes de la 1.1.1, se descubrió una vulnerabilidad de salto de ruta en la abstracción del sistema de archivos dirFS de apko. Un atacante que pueda suministrar un paquete APK malicioso (por ejemplo, a través de un repositorio comprometido o con typosquatting) podría crear directorios o enlaces simbólicos fuera de la raíz de instalación prevista. Los métodos MkdirAll, Mkdir y Symlink en pkg/apk/fs/rwosfs.go usan filepath.Join() sin validar que la ruta resultante permanezca dentro del directorio base. Este problema ha sido parcheado en la versión 1.1.1.
References
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-25121 changed 2026-02-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-5g94-c2wx-8pxw changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4405 changed 2026-02-06 | CC-BY-4.0 |
| NVD | CVE-2026-25121 changed 2026-06-17 | Public domain |