CVE-2025-53945: apko is vulnerable to attack through incorrect permissions in /etc/ld.so.cache and other files
It was discovered that the ld.so.cache in images generated by apko had file system permissions mode 0666: This issue was introduced in commit 04f37e2 ("generate /etc/ld.so.cache (#1629)")(v0.27.0). Impact This potentially allows a local unprivileged user to add additional additional directories including dynamic libraries to the dynamic loader path.
Published Jul 18, 2025
Affected packages
chainguard.dev/apko
- Ecosystem
- Go
- Affected
- >= 0.27.0, < 0.29.5
- Fixed in
- 0.29.5
- Check
go list -m chainguard.dev/apko
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
It was discovered that the ld.so.cache in images generated by apko had file system permissions mode 0666:
bash-5.3# find / -type f -perm -o+w
/etc/ld.so.cacheThis issue was introduced in commit 04f37e2 ("generate /etc/ld.so.cache (#1629)")(v0.27.0).
Impact
This potentially allows a local unprivileged user to add additional additional directories including dynamic libraries to the dynamic loader path. A user could exploit this by placing a malicious library in a directory they control.
Patches
This issue was addressed in apko in aedb077 ("fix: /etc/ld.so.cache file permissions (#1758)") (v0.29.5).
Acknowledgements
Many thanks to Cody Harris from H2O.ai for reporting this issue.
Credited to vishal-chdhry, codyharris-h2o-ai, eslerm.
References
- https://github.com/chainguard-dev/apko/security/advisories/GHSA-x6ph-r535-3vjw
- https://nvd.nist.gov/vuln/detail/CVE-2025-53945
- https://github.com/chainguard-dev/apko/commit/04f37e2d50d5a502e155788561fb7d40de705bd9
- https://github.com/chainguard-dev/apko/commit/aedb0772d6bf6e74d8f17690946dbc791d0f6af3
- https://github.com/chainguard-dev/apko/releases/tag/v0.29.5
- https://github.com/advisories/GHSA-x6ph-r535-3vjw
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-54174
melange: Incomplete package integrity verification allows data section substitution
high8.3Jul 10, 2026CVE-2026-42574
apko dirFS has a symlink-following path traversal that allows multiple entry points to escape the build root
high7.5May 4, 2026CVE-2026-42575
apko doesn't verify downloaded apk packages against APKINDEX checksum (package substitution possible)
high7.5May 4, 2026CVE-2026-42576
apko `DiscoverKeys` has a panic on non-rsa jwks key that causes crash during key discovery
medium6.5May 4, 2026CVE-2026-25140
apko affected by potential unbounded resource consumption in expandapk.ExpandApk on attacker-controlled .apk streams
high7.5Feb 4, 2026CVE-2026-25121
apko has a path traversal in apko dirFS which allows filesystem writes outside base
high7.5Feb 3, 2026
