CRI-O vulnerable to /etc/passwd tampering resulting in Privilege Escalation
Published 29 Dec 2022 · Updated 21 Aug 2024
Is your project on an affected github.com/cri-o/cri-o?
Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <1.26.0
- Fixed in
- 1.26.0
go get github.com/cri-o/cri-o@v1.26.0Details
Impact
It is possible to craft an environment variable with newlines to add entries to a container's /etc/passwd. It is possible to circumvent admission validation of username/UID by adding such an entry.
Note: because the pod author is in control of the container's /etc/passwd, this is not considered a new risk factor. However, this advisory is being opened for transparency and as a way of tracking fixes.
Patches
1.26.0 will have the fix. More patches will be posted as they're available.
Workarounds
Additional security controls like SELinux should prevent any damage a container is able to do with root on the host. Using SELinux is recommended because this class of attack is already possible by manually editing the container's /etc/passwd
References
Is GHSA-cm9x-c3rh-7rc4 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/cri-o/cri-o, and gives you the command that fixes it.
More advisories for github.com/cri-o/cri-o
- LowCVE-2025-4437CRI-O has Potential High Memory Consumption from File Read in github.com/cri-o/cri-o · 29 Aug 2025
- MediumCVE-2025-4437CRI-O has Potential High Memory Consumption from File Read · 20 Aug 2025
- LowCVE-2025-0750CRI-O Path Traversal vulnerability in github.com/cri-o/cri-o · 29 Jan 2025
- MediumCVE-2025-0750CRI-O Path Traversal vulnerability · 28 Jan 2025
- LowCVE-2024-8676CRI-O: Maliciously structured checkpoint file can gain arbitrary node access in github.com/cri-o/cri-o · 4 Dec 2024
- MediumCVE-2024-8676CRI-O: Maliciously structured checkpoint file can gain arbitrary node access · 26 Nov 2024
References
- Linkgithub.com/cri-o/cri-o/security/advisories/GHSA-cm9x-c3rh-7rc4
- Advisorynvd.nist.gov/vuln/detail/CVE-2022-4318
- Linkgithub.com/cri-o/cri-o/pull/6450
- Linkaccess.redhat.com/errata/RHSA-2023:1033
- Linkaccess.redhat.com/errata/RHSA-2023:1503
- Linkaccess.redhat.com/security/cve/CVE-2022-4318
- Linkbugzilla.redhat.com/show_bug.cgi?id=2152703
- Packagegithub.com/cri-o/cri-o
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.