CVE-2022-4318
Cri-o: /etc/passwd tampering privesc
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.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.8
Cri-o: /etc/passwd tampering privesc
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.
- Record
CVE-2022-4318- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-538
- Updated
- 2026-11-02
EUVDEUVD-2022-7601
7.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.
- Record
EUVD-2022-7601- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-cm9x-c3rh-7rc4
6.1
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
- Record
GHSA-cm9x-c3rh-7rc4- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:L/I:H/A:N - Weakness
- CWE-538, CWE-913
- Updated
- 2026-11-02
NVD
7.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.
- Record
CVE-2022-4318- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-538, CWE-913
- Updated
- 2026-11-02
OSVALPINE-CVE-2022-4318
7.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.
- Record
ALPINE-CVE-2022-4318- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
OSVAZL-39873
7.8
CVE-2022-4318 affecting package cri-o for versions less than 1.22.3-1
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.
- Record
AZL-39873- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 5 moreShow less
OSVGHSA-cm9x-c3rh-7rc4
6.1
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
- Record
GHSA-cm9x-c3rh-7rc4- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:L/I:H/A:N - Weakness
- CWE-538, CWE-913
- Updated
- 2026-11-02
OSVOESA-2024-1406
7.5
cri-o security update
Open Container Initiative-based implementation of Kubernetes Container Runtime Interface.
Security Fix(es):
A maliciously crafted HTTP/2 stream could cause excessive CPU consumption in the HPACK decoder, sufficient to cause a denial of service from a small number of small requests.(CVE-2022-41723)
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.(CVE-2022-4318)
A malicious HTTP/2 client which rapidly creates requests and immediately resets them can cause excessive server resource consumption. While the total number of requests is bounded by the http2.Server.MaxConcurrentStreams setting, resetting an in-progress request allows the attacker to create a new request while the existing one is still executing. With the fix applied, HTTP/2 servers now bound the number of simultaneously executing handler goroutines to the stream concurrency limit (MaxConcurrentStreams). New requests arriving when at the limit (which can only happen after the client has reset an existing, in-flight request) will be queued until a handler exits. If the request queue grows too large, the server will terminate the connection. This issue is also fixed in golang.org/x/net/http2 for users manually configuring HTTP/2. The default stream concurrency limit is 250 streams (requests) per HTTP/2 connection. This value may be adjusted using the golang.org/x/net/http2 package; see the Server.MaxConcurrentStreams setting and the ConfigureServer function.(CVE-2023-39325)
The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remote attackers to bypass integrity checks such that some packets are omitted (from the extension negotiation message), and a client and server may consequently end up with a connection for which some security features have been downgraded or disabled, aka a Terrapin attack. This occurs because the SSH Binary Packet Protocol (BPP), implemented by these extensions, mishandles the handshake phase and mishandles use of sequence numbers. For example, there is an effective attack against SSH's use of ChaCha20-Poly1305 (and CBC with Encrypt-then-MAC). The bypass occurs in [email protected] and (if CBC is used) the [email protected] MAC algorithms. This also affects Maverick Synergy Java SSH API before 3.1.0-SNAPSHOT, Dropbear through 2022.83, Ssh before 5.1.1 in Erlang/OTP, PuTTY before 0.80, AsyncSSH before 2.14.2, golang.org/x/crypto before 0.17.0, libssh before 0.10.6, libssh2 through 1.11.0, Thorn Tech SFTP Gateway before 3.4.6, Tera Term before 5.1, Paramiko before 3.4.0, jsch before 0.2.15, SFTPGo before 2.5.6, Netgate pfSense Plus through 23.09.1, Netgate pfSense CE through 2.7.2, HPN-SSH through 18.2.0, ProFTPD before 1.3.8b (and before 1.3.9rc2), ORYX CycloneSSH before 2.3.4, NetSarang XShell 7 before Build 0144, CrushFTP before 10.6.0, ConnectBot SSH library before 2.2.22, Apache MINA sshd through 2.11.0, sshj through 0.37.0, TinySSH through 20230101, trilead-ssh2 6401, LANCOM LCOS and LANconfig, FileZilla before 3.66.4, Nova before 11.8, PKIX-SSH before 14.4, SecureCRT before 9.4.3, Transmit5 before 5.10.4, Win32-OpenSSH before 9.5.0.0p1-Beta, WinSCP before 6.2.2, Bitvise SSH Server before 9.32, Bitvise SSH Client before 9.33, KiTTY through 0.76.1.13, the net-ssh gem 7.2.0 for Ruby, the mscdex ssh2 module before 1.15.0 for Node.js, the thrussh library before 0.35.1 for Rust, and the Russh crate before 0.40.2 for Rust.(CVE-2023-48795)
- Record
OESA-2024-1406- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVRHSA-2023:1033
7.8
Red Hat Security Advisory: OpenShift Container Platform 4.12.6 packages and security update
- Record
RHSA-2023:1033- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2023:1503
7.8
Red Hat Security Advisory: OpenShift Container Platform 4.11.34 packages and security update
- Record
RHSA-2023:1503- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVGO-2022-1206 No score
CRI-O vulnerable to /etc/passwd tampering resulting in Privilege Escalation in github.com/cri-o/cri-o
CRI-O vulnerable to /etc/passwd tampering resulting in Privilege Escalation in github.com/cri-o/cri-o
- Record
GO-2022-1206- Updated
- 2026-11-02
Affected products
- kubernetes cri-o
- fedoraproject extra packages for enterprise linux
- fedoraproject fedora
- red hat enterprise linux 9
- red hat openshift container platform 4.11
- red hat openshift container platform 4.12
- redhat openshift container platform for arm64
- redhat openshift container platform for linuxone
- redhat openshift container platform for power
- redhat openshift container platform ibm z systems
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/cri-o/cri-oGo |
before 1.26.0 | 1.26.0 |
cri-oAlpine:v3.21 |
before 1.26.2-r0 | 1.26.2-r0 |
cri-oAlpine:v3.22 |
before 1.26.2-r0 | 1.26.2-r0 |
cri-oAlpine:v3.23 |
before 1.26.2-r0 | 1.26.2-r0 |
cri-oAlpine:v3.24 |
before 1.26.2-r0 | 1.26.2-r0 |
cri-oAzure Linux:2 |
before 1.22.3-1 | 1.22.3-1 |
cri-oopenEuler:22.03-LTS-SP1 |
before 1.23.2-11.oe2203sp1 | 1.23.2-11.oe2203sp1 |
cri-oRed Hat:openshift:4.12::el8 |
before 0:1.25.2-10.rhaos4.12.git0a083f9.el8 | 0:1.25.2-10.rhaos4.12.git0a083f9.el8 |
cri-o-debuginfoRed Hat:openshift:4.12::el8 |
before 0:1.25.2-10.rhaos4.12.git0a083f9.el8 | 0:1.25.2-10.rhaos4.12.git0a083f9.el8 |
cri-o-debugsourceRed Hat:openshift:4.12::el8 |
before 0:1.25.2-10.rhaos4.12.git0a083f9.el8 | 0:1.25.2-10.rhaos4.12.git0a083f9.el8 |
Show 6 moreShow less
| Package | Affected | Fixed |
|---|---|---|
cri-oRed Hat:openshift:4.12::el9 |
before 0:1.25.2-9.rhaos4.12.git0a083f9.el9 | 0:1.25.2-9.rhaos4.12.git0a083f9.el9 |
cri-o-debuginfoRed Hat:openshift:4.12::el9 |
before 0:1.25.2-9.rhaos4.12.git0a083f9.el9 | 0:1.25.2-9.rhaos4.12.git0a083f9.el9 |
cri-o-debugsourceRed Hat:openshift:4.12::el9 |
before 0:1.25.2-9.rhaos4.12.git0a083f9.el9 | 0:1.25.2-9.rhaos4.12.git0a083f9.el9 |
cri-oRed Hat:openshift:4.11::el8 |
before 0:1.24.4-10.rhaos4.11.git1ed5ac5.el8 | 0:1.24.4-10.rhaos4.11.git1ed5ac5.el8 |
cri-o-debuginfoRed Hat:openshift:4.11::el8 |
before 0:1.24.4-10.rhaos4.11.git1ed5ac5.el8 | 0:1.24.4-10.rhaos4.11.git1ed5ac5.el8 |
cri-o-debugsourceRed Hat:openshift:4.11::el8 |
before 0:1.24.4-10.rhaos4.11.git1ed5ac5.el8 | 0:1.24.4-10.rhaos4.11.git1ed5ac5.el8 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, aliases, references | OSV | |
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-4318 is a high vulnerability (CVSS 7.8) in Kubernetes Cri-o, published December 29, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.29%, the 21st percentile. Fixed in github.com/cri-o/cri-o 1.26.0.
References
access.redhat.com/errata/RHSA-2023:1033
access.redhat.com/errata/RHSA-2023:1503
access.redhat.com/security/cve/CVE-2022-4318
bugzilla.redhat.com/show_bug.cgi?id=2152703
github.com/cri-o/cri-o/security/advisories/GHSA-cm9x-c3rh-7rc4
github.com/cri-o/cri-o/pull/6450
Show 13 moreShow less
nvd.nist.gov/vuln/detail/CVE-2022-4318
github.com/advisories/GHSA-cm9x-c3rh-7rc4
security.alpinelinux.org/vuln/CVE-2022-4318
github.com/cri-o/cri-o
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2024-1406
nvd.nist.gov/vuln/detail/CVE-2022-41723
nvd.nist.gov/vuln/detail/CVE-2023-39325
nvd.nist.gov/vuln/detail/CVE-2023-48795
access.redhat.com/security/updates/classification
security.access.redhat.com/data/csaf/v2/advisories/2023/rhsa-2023_1033.json
cve.org/CVERecord?id=CVE-2022-4318
docs.openshift.com/container-platform/4.11/release_notes/ocp-4-11-release-notes.html
security.access.redhat.com/data/csaf/v2/advisories/2023/rhsa-2023_1503.json