7.0high
apko has incorrect permission (0666) in /etc/ld.so.cache and other files
- Severity
- 7.0high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.14% (higher than 3% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-x6ph-r535-3vjwGO-2025-3816
Description
apko allows users to build and publish OCI container images built from apk packages. Starting in version 0.27.0 and prior to version 0.29.5, critical files were inadvertently set to 0666, which could likely be abused for root escalation. Version 0.29.5 contains a fix for the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| chainguard-dev apko | >= 0.27.0, < 0.29.5 | CVE List |
| chainguard.dev/apko (Go) | from 0.27.0 before 0.29.5 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 7.0high CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L |
| GitHub | 7.0high CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
apko allows users to build and publish OCI container images built from apk packages. Starting in version 0.27.0 and prior to version 0.29.5, critical files were inadvertently set to 0666, which could likely be abused for root escalation. Version 0.29.5 contains a fix for the issue.
GitHub Advisory Database
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.cache
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. 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.
Go Vulnerability Database
apko is vulnerable to attack through incorrect permissions in /etc/ld.so.cache and other files in chainguard.dev/apko
NVD (es)
apko permite a los usuarios crear y publicar imágenes de contenedores OCI a partir de paquetes APK. A partir de la versión 0.27.0 y anteriores a la 0.29.5, los archivos críticos se configuraban inadvertidamente como 0666, lo que podría utilizarse para escalar privilegios de root. La versión 0.29.5 incluye una solución para este problema.
References
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-53945 changed 2025-07-22 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-x6ph-r535-3vjw changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2025-3816 changed 2026-02-04 | CC-BY-4.0 |
| NVD | CVE-2025-53945 changed 2026-06-17 | Public domain |