Plattform
go
Komponente
chainguard.dev/apko
Behoben in
0.14.9
1.1.0
CVE-2026-25121 describes a Path Traversal vulnerability discovered in the chainguard.dev/apko tool, a tool for building APK images. This vulnerability allows an attacker to potentially create directories or symbolic links outside the intended installation root, leading to unauthorized access or modification of system files. The vulnerability affects versions prior to 1.1.0 and has been resolved in that release.
The core of the vulnerability lies in the filepath.Join() function used within the MkdirAll, Mkdir, and Symlink methods in pkg/apk/fs/rwosfs.go. This function doesn't adequately validate the resulting path, allowing an attacker to craft a malicious APK package that, when processed by apko, creates files or links outside of the designated installation directory. Successful exploitation could lead to arbitrary file system access, potentially allowing an attacker to overwrite critical system files, execute malicious code, or gain persistent access to the system. The impact is amplified if apko is used in automated build pipelines or within container orchestration environments, as a compromised APK repository could silently inject malicious components into deployed applications.
As of the publication date (2026-02-03), this vulnerability is not listed on the CISA KEV catalog. There are no publicly known proof-of-concept exploits available. The vulnerability's impact depends heavily on the trustworthiness of the APK package sources used with apko. Given the ease of creating malicious APK packages, it is recommended to treat this vulnerability with high priority, especially in environments where APKs are sourced from untrusted repositories.
Organizations and developers using chainguard.dev/apko for building APK images, particularly those relying on external or untrusted repositories for APK packages, are at risk. Shared hosting environments where multiple users share the same apko installation are also particularly vulnerable, as a compromised APK package from one user could potentially impact other users.
• linux / server: Monitor apko process file system activity using lsof or auditd for unexpected writes outside the intended installation directory.
lsof -p $(pgrep apko) | grep '/outside/intended/path/'• generic web: Inspect APK package metadata for suspicious file paths or directory structures before processing. Use tools like zip -v to examine the contents of the APK.
• go: Review the pkg/apk/fs/rwosfs.go file for instances of filepath.Join() without proper path validation. Look for potential bypasses of intended directory boundaries.
disclosure
Exploit-Status
EPSS
0.07% (22% Perzentil)
CISA SSVC
CVSS-Vektor
The primary mitigation for CVE-2026-25121 is to upgrade to version 1.1.0 or later of chainguard.dev/apko. This version includes a fix that properly validates file paths, preventing the path traversal vulnerability. If upgrading immediately is not feasible, consider implementing stricter input validation on APK packages before processing them with apko. This could involve verifying the source of the APK, checking its checksum, and scanning it for suspicious content. While not a direct fix, restricting the permissions of the user account running apko can limit the potential damage from a successful exploit. After upgrading, confirm the fix by attempting to create a symbolic link outside the intended installation directory using a malicious APK package; the operation should fail.
Actualice la versión de apko a la 1.1.1 o superior. Esto corrige la vulnerabilidad de path traversal que permite la escritura de archivos fuera del directorio base. Puede obtener la última versión desde el repositorio oficial o utilizando el gestor de paquetes correspondiente.
Schwachstellenanalysen und kritische Warnungen direkt in deinen Posteingang.
CVE-2026-25121 is a HIGH severity Path Traversal vulnerability in chainguard.dev/apko, allowing attackers to create directories/symlinks outside the intended installation root via malicious APK packages.
You are affected if you are using chainguard.dev/apko versions prior to 1.1.0 and have not implemented mitigating controls.
Upgrade to version 1.1.0 or later of chainguard.dev/apko. Implement stricter input validation on APK packages if immediate upgrade is not possible.
No active exploitation campaigns have been reported as of the publication date, but the vulnerability's ease of exploitation warrants caution.
Refer to the chainguard.dev/apko GitHub repository for updates and advisories: https://github.com/chainguard-dev/apko
Lade deine Abhängigkeitsdatei hoch und erfahre sofort, ob dich diese und andere CVEs treffen.
Lade deine go.mod-Datei hoch und wir sagen dir sofort, ob du betroffen bist.