CVE-2025-53945
JSON

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 packageVersionsReported by
chainguard-dev apko>= 0.27.0, < 0.29.5CVE List
chainguard.dev/apko (Go)from 0.27.0 before 0.29.5GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M7.0high CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L
GitHub7.0high CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L

Classification

CWE-276

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

SourceRecordLicence
CVE ListCVE-2025-53945 changed 2025-07-22CVE Terms of Use
GitHub Advisory DatabaseGHSA-x6ph-r535-3vjw changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2025-3816 changed 2026-02-04CC-BY-4.0
NVDCVE-2025-53945 changed 2026-06-17Public domain