CVE-2026-42574 Details
Description
apko allows users to build and publish OCI container images built from apk packages. From version 0.14.8 to before version 1.2.5, a crafted .apk could install a TypeSymlink tar entry whose target pointed outside the build root, and a subsequent directory-creation or file-write entry in the same or later archive could traverse that symlink to reach host paths the build user could write to. This issue has been patched in version 1.2.5.
A path traversal vulnerability has been identified in the 'apko' tool, which allows users to create and publish OCI container images from APK packages. This vulnerability exists in versions 0.14.8 prior to 1.2.5. The issue arises because a malicious APK can include a symlink that points outside the build root. Subsequent file-write or directory-creation actions can then traverse this symlink, accessing host paths that the build user can write to. The vulnerability is rooted in the 'sanitizePath' function, which failed to properly handle symlinks, allowing them to escape the intended directory structure. Exploitation can occur through the 'apko build-cpio' command or by using the 'apko' tool's 'pkg/apk/fs' package methods that interact with the filesystem.
Users should upgrade to 'apko' version 1.2.5 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed May 9, 2026CISA-ADP
Assessed May 11, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/chainguard-dev/apko/commit/f5a96e1299ac81c7ea9441705ec467688086f442 | [email protected] | Source CodeVendor |
| https://github.com/chainguard-dev/apko/pull/2187 | [email protected] | Source CodeVendor |
| https://github.com/chainguard-dev/apko/releases/tag/v1.2.5 | [email protected] | Release NotesVendor |
| https://github.com/chainguard-dev/apko/security/advisories/GHSA-qq3r-w4hj-gjp6 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
| CWE-59 | Improper Link Resolution Before File Access ('Link Following') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| chainguard-dev apko | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 24, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 9, 2026 | New CVE Received | [email protected] |
Volerion