Skip to content

CRI-O vulnerable to /etc/passwd tampering resulting in Privilege Escalation

Moderate severity GitHub Reviewed Published Dec 23, 2022 in cri-o/cri-o • Updated May 3, 2024

Package

gomod github.com/cri-o/cri-o (Go)

Affected versions

< 1.26.0

Patched versions

1.26.0

Description

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

References

@haircommander haircommander published to cri-o/cri-o Dec 23, 2022
Published to the GitHub Advisory Database Dec 29, 2022
Reviewed Dec 29, 2022
Published by the National Vulnerability Database Sep 25, 2023
Last updated May 3, 2024

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
High
Privileges required
High
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:L/I:H/A:N

EPSS score

0.042%
(5th percentile)

CVE ID

CVE-2022-4318

GHSA ID

GHSA-cm9x-c3rh-7rc4

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.