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

High 7.8 Published Updated

Attackers can escalate privileges by injecting arbitrary lines into /etc/passwd via a crafted environment variable in CRI-O.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-4318?

CVE-2022-4318 is a high-severity vulnerability in Fedoraproject Extra Packages for Enterprise Linux, published on 25 Sep 2023. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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.

Weakness: CWE-913, CWE-538

Which versions are affected by CVE-2022-4318?

3 open source packages ship an affected version, including github.com/cri-o/cri-o. It affects 7 products.

PackageAffectedFixed in
github.com/cri-o/cri-o GoAll versions1.26.0
github.com/cri-o/cri-o GoAll versions1.26.0
github.com/cri-o/cri-o GoAll versions1.26.0
Linux distribution packages (9)
cri-o Red Hat:openshift:4.11::el8All versions0:1.24.4-10.rhaos4.11.git1ed5ac5.el8
cri-o-debuginfo Red Hat:openshift:4.11::el8All versions0:1.24.4-10.rhaos4.11.git1ed5ac5.el8
cri-o-debugsource Red Hat:openshift:4.11::el8All versions0:1.24.4-10.rhaos4.11.git1ed5ac5.el8
cri-o Red Hat:openshift:4.12::el8All versions0:1.25.2-10.rhaos4.12.git0a083f9.el8
cri-o-debuginfo Red Hat:openshift:4.12::el8All versions0:1.25.2-10.rhaos4.12.git0a083f9.el8
cri-o-debugsource Red Hat:openshift:4.12::el8All versions0:1.25.2-10.rhaos4.12.git0a083f9.el8
cri-o Red Hat:openshift:4.12::el9All versions0:1.25.2-9.rhaos4.12.git0a083f9.el9
cri-o-debuginfo Red Hat:openshift:4.12::el9All versions0:1.25.2-9.rhaos4.12.git0a083f9.el9
cri-o-debugsource Red Hat:openshift:4.12::el9All versions0:1.25.2-9.rhaos4.12.git0a083f9.el9

Products include Fedoraproject Extra Packages for Enterprise Linux, Fedoraproject Fedora, Kubernetes Cri-O, Redhat Openshift Container Platform for Arm64, Redhat Openshift Container Platform for Linuxone, Redhat Openshift Container Platform for Power and 1 more.

How do I fix CVE-2022-4318?

Upgrade github.com/cri-o/cri-o to 1.26.0 or later.

Is CVE-2022-4318 being exploited?

There is no known exploitation of CVE-2022-4318 in the wild and no public exploit code.

All Fedoraproject Extra Packages for Enterprise Linux vulnerabilities

Sources

Also known as AZL-39873, GHSA-cm9x-c3rh-7rc4, GO-2022-1206, RHSA-2023:1033, RHSA-2023:1503.

Is CVE-2022-4318 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free