CVE-2026-25121

apko is vulnerable to path traversal in apko dirFS which allows filesystem writes outside base

Published Feb 4, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
apko allows users to build and publish OCI container images built from apk packages. From version 0.14.8 to before 1.1.1, a path traversal vulnerability was discovered in apko's dirFS filesystem abstraction. An attacker who can supply a malicious APK package (e.g., via a compromised or typosquatted repository) could create directories or symlinks outside the intended installation root. The MkdirAll, Mkdir, and Symlink methods in pkg/apk/fs/rwosfs.go use filepath.Join() without validating that the resulting path stays within the base directory. This issue has been patched in version 1.1.1.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-5g94-c2wx-8pxw apko has a path traversal in apko dirFS which allows filesystem writes outside base
History
Type Values Removed Values Added
First Time appeared Chainguard
Chainguard apko
Weaknesses CWE-22
CPEs cpe:2.3:a:chainguard:apko:*:*:*:*:*:go:*:*
Vendors & Products Chainguard
Chainguard apko
Type Values Removed Values Added
First Time appeared Chainguard-dev
Chainguard-dev apko
Vendors & Products Chainguard-dev
Chainguard-dev apko
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description apko allows users to build and publish OCI container images built from apk packages. From version 0.14.8 to before 1.1.1, a path traversal vulnerability was discovered in apko's dirFS filesystem abstraction. An attacker who can supply a malicious APK package (e.g., via a compromised or typosquatted repository) could create directories or symlinks outside the intended installation root. The MkdirAll, Mkdir, and Symlink methods in pkg/apk/fs/rwosfs.go use filepath.Join() without validating that the resulting path stays within the base directory. This issue has been patched in version 1.1.1.
Title apko is vulnerable to path traversal in apko dirFS which allows filesystem writes outside base
Weaknesses CWE-23
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 4, 2026, 7:18 PM
Reserved
Jan 29, 2026, 2:03 PM
Status
Analyzed
Published
Feb 4, 2026, 7:16 PM
Modified
Jun 17, 2026, 10:24 AM