Advisory

GHSA-5g94-c2wx-8pxw

Also known as: CVE-2026-25121, GO-2026-4405

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.

Fix: Fixed by d8b7887. Merged into release.

Acknowledgements

apko thanks Oleh Konko from 1seal for discovering and reporting this issue.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-02-03 23:57 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

chainguard.dev/apko

Go · All systems

Affected

  • introduced 0.14.8, fixed 1.1.0 (semver)

Fixed versions

1.1.0

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences