{"id":"CVE-2025-53945","aliases":["CVE-2025-53945","GHSA-x6ph-r535-3vjw","GO-2025-3816"],"related":["CGA-3g3j-8396-2m48"],"kind":"vulnerability","state":"published","title":"apko has incorrect permission (0666) in /etc/ld.so.cache and other files","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"It was discovered that the ld.so.cache in images generated by apko had file system permissions mode `0666`:\n```\nbash-5.3# find / -type f -perm -o+w\n/etc/ld.so.cache\n```\n\nThis issue was introduced in commit [04f37e2 (\"generate /etc/ld.so.cache (#1629)\")](https://github.com/chainguard-dev/apko/commit/04f37e2d50d5a502e155788561fb7d40de705bd9)([v0.27.0](https://github.com/chainguard-dev/apko/releases/tag/v0.27.0)).\n\n###  Impact\nThis 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.\n\n### Patches\nThis issue was addressed in apko in [aedb077 (\"fix: /etc/ld.so.cache file permissions (#1758)\")](https://github.com/chainguard-dev/apko/commit/aedb0772d6bf6e74d8f17690946dbc791d0f6af3) ([v0.29.5](https://github.com/chainguard-dev/apko/releases/tag/v0.29.5)).\n\n### Acknowledgements\n\nMany thanks to Cody Harris from [H2O.ai](http://h2o.ai/) for reporting this issue.","format":"markdown","source":"ghsa"},{"lang":"en","text":"apko is vulnerable to attack through incorrect permissions in /etc/ld.so.cache and other files in chainguard.dev/apko","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2025-07-18T15:35:17.325Z","modified":"2026-09-10T03:50:57.949Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L","score":7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L","score":7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L","score":7,"rating":"HIGH"}],"cwes":["CWE-276"],"affected":[{"ranges":[{"version":">= 0.27.0, < 0.29.5","status":"affected"}],"vendor":"chainguard-dev","product":"apko","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.27.0","status":"affected","fixed":"0.29.5"}],"ecosystem":"Go","package":"chainguard.dev/apko","purl":"pkg:golang/chainguard.dev/apko","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.27.0","status":"affected","fixed":"0.29.5"}],"ecosystem":"Go","package":"chainguard.dev/apko","purl":"pkg:golang/chainguard.dev/apko","source":"go"}],"references":[{"url":"https://github.com/chainguard-dev/apko/security/advisories/GHSA-x6ph-r535-3vjw","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/chainguard-dev/apko/commit/04f37e2d50d5a502e155788561fb7d40de705bd9","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/chainguard-dev/apko/commit/aedb0772d6bf6e74d8f17690946dbc791d0f6af3","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/chainguard-dev/apko/releases/tag/v0.27.0","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/chainguard-dev/apko/releases/tag/v0.29.5","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-53945","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/chainguard-dev/apko","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-07-22T15:03:34.863Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-53945","url":"https://www.cve.org/CVERecord?id=CVE-2025-53945","licence":"CVE Terms of Use","modified":"2025-07-22T15:03:42.966Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x6ph-r535-3vjw","url":"https://github.com/advisories/GHSA-x6ph-r535-3vjw","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:57.949Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2025-3816","url":"https://pkg.go.dev/vuln/GO-2025-3816","licence":"CC-BY-4.0","modified":"2026-02-04T04:41:04.119Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-53945","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-53945","licence":"Public domain","modified":"2026-06-17T09:39:10.453Z"}],"updatedAt":"2026-11-25T22:59:01.416Z","epss":{"score":0.00143,"percentile":0.03792,"date":"2026-12-01T12:00:22.000Z"}}