CRI-O vulnerable to /etc/passwd tampering resulting in Privilege Escalation
### 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
describes (1)
Related CVEs.
| ID | severity | exploitable | ||
|---|---|---|---|---|
| CVE-2022-4318US | high7.8 | — | ||
A vulnerability was found in cri-o. This issue allows the addition of arbitrary lines into /etc/passwd by use of a specially crafted environment variable. | ||||
references
External citations — patches, advisories, analysis.
- https://access.redhat.com/errata/RHSA-2023:1033WEB
- https://access.redhat.com/errata/RHSA-2023:1503WEB
- https://access.redhat.com/security/cve/CVE-2022-4318WEB
- https://bugzilla.redhat.com/show_bug.cgi?id=2152703WEB
- https://github.com/cri-o/cri-oPACKAGE
- https://github.com/cri-o/cri-o/pull/6450WEB
- https://github.com/cri-o/cri-o/security/advisories/GHSA-cm9x-c3rh-7rc4WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-4318ADVISORY
Advisories like this name the exposed products attackers go after on your perimeter. See what is exposed on your perimeter with a free passive scan.
Free scan