CVE-2026-25121: Chainguard.dev/apko Path Traversal Vulnerability
HIGHCVE-2026-25121 is a HIGH (CVSS 7.5) path traversal vulnerability (CWE-23: Relative Path Traversal) affecting Chainguard.dev/apko libraries in the Go ecosystem. The issue involves apko has a path traversal in apko dirfs which allows filesystem writes outside base. Remediation is available by upgrading affected packages to version 1.1.0.
CVE-2026-25121 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2026-25121
To remediate this vulnerability, upgrade all affected Chainguard.dev/apko dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade chainguard.dev/apko to 1.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for chainguard.dev/apko
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-25121, inspect your project dependencies for Chainguard.dev/apko:
inspect dependencies for chainguard.dev/apko
Analyze the terminal output to locate any version of Chainguard.dev/apko in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. In Chainguard.dev/apko, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-25121 Affected Chainguard.dev/apko Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
chainguard.dev/apko
|
Go |
≥ 0.14.8
< 1.1.0
|
1.1.0
|
References
Frequently Asked Questions
What is CVE-2026-25121?
Which Chainguard.dev/apko versions are affected?
What version fixes CVE-2026-25121?
Is chainguard.dev/apko affected?
What is the CVSS score of CVE-2026-25121?
What CWE is associated with CVE-2026-25121?
How can I check Go dependencies for CVE-2026-25121?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5g94-c2wx-8pxw",
"modified" : "2026-02-04T21:55:44Z",
"published" : "2026-02-03T23:57:48Z",
"aliases" : [ "CVE-2026-25121" ],
"summary" : "apko has a path traversal in apko dirFS which allows filesystem writes outside base",
"details" : "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.\n\n**Fix:** Fixed by [d8b7887](https://github.com/chainguard-dev/apko/commit/d8b7887a968a527791b3c591ae83928cb49a9f14). Merged into release. \n\n**Acknowledgements** \n \napko thanks Oleh Konko from [1seal](https://1seal.org/) for discovering and reporting this issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "chainguard.dev/apko"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.14.8"
}, {
"fixed" : "1.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/chainguard-dev/apko/security/advisories/GHSA-5g94-c2wx-8pxw"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25121"
}, {
"type" : "WEB",
"url" : "https://github.com/chainguard-dev/apko/commit/d8b7887a968a527791b3c591ae83928cb49a9f14"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/chainguard-dev/apko"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-23" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-03T23:57:48Z",
"nvd_published_at" : "2026-02-04T19:16:14Z"
}
}