
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-25121 is a path traversal vulnerability in Chainguard's apko tool, a utility for building and publishing OCI container images from APK packages. The flaw exists in apko's dirFS filesystem abstraction, allowing an attacker who can supply a malicious APK package to create directories or symlinks outside the intended installation root. It affects apko versions >= 0.14.8 and < 1.1.1 (Go module chainguard.dev/apko). Disclosed on February 3, 2026, by Oleh Konko from 1seal, it carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory, GHSA).
The root cause is improper path validation (CWE-22, CWE-23) in the MkdirAll, Mkdir, and Symlink methods within pkg/apk/fs/rwosfs.go. These methods use Go's filepath.Join() to construct paths without subsequently verifying that the resolved path remains within the designated base directory, enabling ../ sequences in APK tar headers to escape the filesystem root. An attacker exploits this by crafting a malicious APK package — deliverable via a compromised or typosquatted APK repository — containing tar headers with path traversal sequences (e.g., ../outside/pwned) as directory or symlink names. The fix (commit d8b7887) introduced a sanitizePath helper that validates all path constructions against the base directory and updated the helper to catch edge cases such as sanitizePath("../", "../..") (GitHub Advisory, Fix Commit).
Successful exploitation allows an attacker to write arbitrary directories, symlinks, or hardlinks to locations outside the intended container image build root on the host filesystem. This primarily impacts integrity (CVSS Integrity: High), as an attacker could plant malicious files or symlinks in sensitive host directories during the image build process, potentially enabling privilege escalation, persistence, or supply chain compromise of built container images. Confidentiality and availability are not directly impacted by this vulnerability (GitHub Advisory).
No public proof-of-concept exploit code or evidence of in-the-wild exploitation has been reported. The EPSS score is approximately 0.025% (7th percentile), indicating a low near-term exploitation probability (GHSA). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires the ability to supply a malicious APK package to a vulnerable apko build pipeline, which could be achieved through a compromised upstream repository or a typosquatting attack.
../outside/pwned) as directory names or symlink names in the tar headers.MkdirAll, Mkdir, or Symlink methods process the traversal paths without validation, writing directories or symlinks outside the intended build root on the host filesystem.../ patterns in their originating paths.Upgrade apko to version 1.1.1 or later, which contains the fix introduced in commit d8b7887 (GitHub Advisory, Fix Commit). As a compensating control prior to patching, restrict apko build pipelines to only consume APK packages from trusted, verified repositories and implement repository integrity checks (e.g., signature verification). Running apko builds in isolated, sandboxed environments (e.g., containers with restricted filesystem mounts) can also limit the blast radius of a successful exploit.
The vulnerability was discovered and responsibly disclosed by Oleh Konko from security firm 1seal, and the Chainguard team credited multiple contributors for remediation coordination and review (GitHub Advisory). The issue was picked up by standard vulnerability aggregators and Linux security news outlets shortly after disclosure, with no notable broader community controversy or significant social media discussion identified.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."