CVE-2022-4318: Cri-o: /etc/passwd tampering privesc

Published Dec 12, 2022
·
Updated

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

Other sources

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.

It is possible to craft an environment variable with newlines to add entries to /etc/passwd. Using the default SCC prevents the privesc. A malicious user could use a non-default SCC (anyuid, for example) that allows the process to become root on the host.

Red Hat

Affected Software

34 affected componentsFixes available
redhat/cri-o<0:1.24.4-10.rhaos4.11.git1ed5ac5.el8
0:1.24.4-10.rhaos4.11.git1ed5ac5.el8
redhat/cri-o<0:1.25.2-10.rhaos4.12.git0a083f9.el8
0:1.25.2-10.rhaos4.12.git0a083f9.el8
go/github.com/cri-o/cri-o<1.26.0
1.26.0
Kubernetes CRI-O
All of the following
Any of the following
redhat Openshift Container Platform For Arm64=4.12
redhat Openshift Container Platform For Linuxone=4.12
redhat Openshift Container Platform For Power=4.12
redhat Openshift Container Platform Ibm Z Systems=4.12
redhat Enterprise Linux=8.0
All of the following
Any of the following
redhat Openshift Container Platform For Arm64=4.12
redhat Openshift Container Platform For Linuxone=4.12
redhat Openshift Container Platform For Power=4.12
redhat Openshift Container Platform Ibm Z Systems=4.12
redhat Enterprise Linux=9.0
Fedoraproject Extra Packages For Enterprise Linux=8.0
Fedoraproject Fedora=36
Fedoraproject Fedora=37
All of the following
Any of the following
redhat Openshift Container Platform For Arm64=4.11
redhat Openshift Container Platform For Linuxone=4.11
redhat Openshift Container Platform For Power=4.11
redhat Openshift Container Platform Ibm Z Systems=4.11
redhat Enterprise Linux=8.0
redhat Openshift Container Platform For Arm64=4.12
redhat Openshift Container Platform For Linuxone=4.12
redhat Openshift Container Platform For Power=4.12
redhat Openshift Container Platform Ibm Z Systems=4.12
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
redhat Openshift Container Platform For Arm64=4.11
redhat Openshift Container Platform For Linuxone=4.11
redhat Openshift Container Platform For Power=4.11
redhat Openshift Container Platform Ibm Z Systems=4.11
Microsoft cbl2 cri-o 1.22.3-1
Microsoft cbl2 cri-o 1.22.3-14

Event History

Dec 12, 2022
CVE Published
12:00 AM
Data Sourced
via Red Hat·06:23 PM
DescriptionSeverityAffected Software
Dec 29, 2022
Advisory Published
via GitHub·01:49 AM
Sep 25, 2023
CVE Published
via MITRE·07:23 PM
Data Sourced
via MITRE·07:23 PM
DescriptionSeverityWeakness
Sep 4, 2025
Data Sourced
via Microsoft·02:54 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·02:54 AM
Affected Software
Updated
via Microsoft·02:54 AM
DescriptionSeverity

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2022-4318?

CVE-2022-4318 is a vulnerability found in cri-o that allows the addition of arbitrary lines into /etc/passwd.

2

What is the impact of CVE-2022-4318?

The impact of CVE-2022-4318 is the ability to add entries to a container's /etc/passwd by crafting an environment variable with newlines.

3

How can the admission validation of username/UID be circumvented in CVE-2022-4318?

Admission validation of username/UID can be circumvented in CVE-2022-4318 by adding an entry with newlines to the container's /etc/passwd.

4

Which software versions are affected by CVE-2022-4318?

The software versions affected by CVE-2022-4318 include cri-o 1.26.0, Kubernetes Cri-o, Redhat Openshift Container Platform, Redhat Enterprise Linux, Fedoraproject Extra Packages For Enterprise Linux, and Fedoraproject Fedora.

5

What is the severity of CVE-2022-4318?

CVE-2022-4318 has a severity rating of 7.8 (high).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203