GitHub Advisoryadvisory · Go

GHSA-cm9x-c3rh-7rc4 CRI-O vulnerable to /etc/passwd tampering resulting in Privilege Escalation

MEDIUM Published 2022-12-29 Modified 2022-12-29 Official page ↗
Aliases
CVE-2022-4318
Ecosystem
Go
Packages
github.com/cri-o/cri-o
Severity
Moderate
CVSS vector
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:L/I:H/A:N
Weaknesses
CWE-538, CWE-913
Reviewed
2022-12-29

Affected packages

• Go github.com/cri-o/cri-o: < 1.26.0 → fixed in 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

Related

Alias · CVE (1)

  • CVE-2022-4318 A vulnerability was found in cri-o. vulnerability

Weakness · CWE (2)

  • CWE-538 Insertion of Sensitive Information into Externally-Accessible File or Directory weakness
  • CWE-913 Improper Control of Dynamically-Managed Code Resources weakness

References