Impact
The flaw in apko’s dirFS abstraction stems from its use of filepath.Join without verifying that the resulting path remains inside the intended base directory. A malicious APK package can thus instruct apko to create directories or symlinks outside the installation root, allowing the attacker to write arbitrary files during an image build. This can overwrite critical configuration files, inject executable payloads, or otherwise compromise the build environment and the resulting container image. The vulnerability is categorized as path traversal.
Affected Systems
Chainguard‑provided apko versions from 0.14.8 up to (but not including) 1.1.1 are affected. The fix was released with version 1.1.1, which validates path boundaries and prevents the described write escalation.
Risk and Exploitability
The CVSS score of 7.5 indicates a high severity, but the EPSS score of under 1% suggests that exploitation is presently rare. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires an attacker who can supply a compromised or typosquatted APK package to the build process; the attack vector is therefore indirect but can occur if build pipelines rely on external repositories or untrusted package sources.
OpenCVE Enrichment
Github GHSA