CVE-2026-42574: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in chainguard-dev apko
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.
AI Analysis
Technical Summary
The vulnerability in apko (versions >= 0.14.8 and < 1.2.5) involves improper limitation of pathname to a restricted directory (CWE-22) combined with symlink handling issues (CWE-59). A maliciously crafted .apk package can include a TypeSymlink tar entry targeting a location outside the intended build root. Subsequent directory or file creation entries in the archive can then traverse this symlink, allowing writes to arbitrary paths on the host filesystem that the build user can access. This can result in unauthorized modification of host files during the container image build process. The vulnerability has been addressed and patched in apko version 1.2.5.
Potential Impact
Successful exploitation allows an attacker to write files to arbitrary locations on the host system where the build user has write permissions. This can lead to unauthorized file modifications, potentially compromising the build environment or host integrity. The CVSS v3.1 score is 7.5 (high), reflecting network attack vector, no required privileges or user interaction, and impact limited to integrity without confidentiality or availability impact. No known exploits are reported in the wild.
Mitigation Recommendations
Upgrade apko to version 1.2.5 or later, where this path traversal vulnerability has been patched. Since this is a software vulnerability in a non-cloud service, applying the official fix is required to remediate the issue. Patch status is confirmed by the vendor's versioning information. No additional mitigations are indicated by the vendor advisory.
CVE-2026-42574: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in chainguard-dev apko
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.
CVSS v3.1
Score 7.5high
Affected software
pkg:github/chainguard-dev/apkoRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in apko (versions >= 0.14.8 and < 1.2.5) involves improper limitation of pathname to a restricted directory (CWE-22) combined with symlink handling issues (CWE-59). A maliciously crafted .apk package can include a TypeSymlink tar entry targeting a location outside the intended build root. Subsequent directory or file creation entries in the archive can then traverse this symlink, allowing writes to arbitrary paths on the host filesystem that the build user can access. This can result in unauthorized modification of host files during the container image build process. The vulnerability has been addressed and patched in apko version 1.2.5.
Potential Impact
Successful exploitation allows an attacker to write files to arbitrary locations on the host system where the build user has write permissions. This can lead to unauthorized file modifications, potentially compromising the build environment or host integrity. The CVSS v3.1 score is 7.5 (high), reflecting network attack vector, no required privileges or user interaction, and impact limited to integrity without confidentiality or availability impact. No known exploits are reported in the wild.
Mitigation Recommendations
Upgrade apko to version 1.2.5 or later, where this path traversal vulnerability has been patched. Since this is a software vulnerability in a non-cloud service, applying the official fix is required to remediate the issue. Patch status is confirmed by the vendor's versioning information. No additional mitigations are indicated by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-28T17:26:12.085Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69ff8cbdcbff5d86106ac335
Added to database: 05/09/2026, 19:36:29 UTC
Last enriched: 05/17/2026, 10:43:58 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 131
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.