{"id":"CVE-2022-4318","aliases":["CVE-2022-4318","GHSA-cm9x-c3rh-7rc4","GO-2022-1206"],"related":[],"kind":"vulnerability","state":"published","title":"Cri-o: /etc/passwd tampering privesc","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nIt 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.\n\nNote: 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.\n\n### Patches\n1.26.0 will have the fix. More patches will be posted as they're available.\n\n### Workarounds\nAdditional 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 \n\n### References","format":"markdown","source":"ghsa"},{"lang":"en","text":"CRI-O vulnerable to /etc/passwd tampering resulting in Privilege Escalation in github.com/cri-o/cri-o","format":"markdown","source":"go"},{"lang":"es","text":"Se encontró una vulnerabilidad en cri-o. Este problema permite la adición de líneas arbitrarias en /etc/passwd mediante el uso de una variable de entorno especialmente manipulada.","source":"nvd"}],"published":"2022-12-29T01:49:47.000Z","modified":"2026-06-17T05:20:34.713Z","severity":{"scorer":"redhat","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"redhat","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:L/I:H/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-538","CWE-913"],"affected":[{"ranges":[{"type":"rpm","introduced":"0:1.24.4-10.rhaos4.11.git1ed5ac5.el8","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4.11","package":"cri-o","cpe":"cpe:/a:redhat:openshift:4.11::el8","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:1.25.2-9.rhaos4.12.git0a083f9.el9","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4.12","package":"cri-o","cpe":"cpe:/a:redhat:openshift:4.12::el8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"fence-agents","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.26.0"}],"ecosystem":"Go","package":"github.com/cri-o/cri-o","purl":"pkg:golang/github.com/cri-o/cri-o","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.26.0"}],"ecosystem":"Go","package":"github.com/cri-o/cri-o","purl":"pkg:golang/github.com/cri-o/cri-o","source":"go"},{"ranges":[],"vendor":"kubernetes","product":"cri-o","cpe":"cpe:2.3:a:kubernetes:cri-o:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"4.12"},{"status":"affected","version":"4.12"},{"status":"affected","version":"4.11"}],"vendor":"redhat","product":"openshift_container_platform_for_arm64","cpe":"cpe:2.3:a:redhat:openshift_container_platform_for_arm64:4.12:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"4.12"},{"status":"affected","version":"4.12"},{"status":"affected","version":"4.11"}],"vendor":"redhat","product":"openshift_container_platform_for_linuxone","cpe":"cpe:2.3:a:redhat:openshift_container_platform_for_linuxone:4.12:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"4.12"},{"status":"affected","version":"4.12"},{"status":"affected","version":"4.11"}],"vendor":"redhat","product":"openshift_container_platform_for_power","cpe":"cpe:2.3:a:redhat:openshift_container_platform_for_power:4.12:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"4.12"},{"status":"affected","version":"4.12"},{"status":"affected","version":"4.11"}],"vendor":"redhat","product":"openshift_container_platform_ibm_z_systems","cpe":"cpe:2.3:a:redhat:openshift_container_platform_ibm_z_systems:4.12:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"8.0"}],"vendor":"fedoraproject","product":"extra_packages_for_enterprise_linux","cpe":"cpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:8.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"36"},{"status":"affected","version":"37"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://access.redhat.com/errata/RHSA-2023:1033","tags":["third-party-advisory","vendor-advisory","web","x-refsource-redhat","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2023:1503","tags":["third-party-advisory","vendor-advisory","web","x-refsource-redhat","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2022-4318","tags":["third-party-advisory","vdb-entry","web","x-refsource-redhat","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2152703","tags":["issue-tracking","third-party-advisory","web","x-refsource-redhat","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/cri-o/cri-o/security/advisories/GHSA-cm9x-c3rh-7rc4","tags":["advisory","web"],"sources":["ghsa","go"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-4318","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/cri-o/cri-o/pull/6450","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/cri-o/cri-o","tags":["package"],"sources":["ghsa"]}],"credits":["Red Hat would like to thank Burt Holzman (Fermilab) for reporting this issue."],"assigner":"redhat","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2024-05-10T20:59:14.761Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-4318","url":"https://www.cve.org/CVERecord?id=CVE-2022-4318","licence":"CVE Terms of Use","modified":"2024-08-03T01:34:50.124Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cm9x-c3rh-7rc4","url":"https://github.com/advisories/GHSA-cm9x-c3rh-7rc4","licence":"CC-BY-4.0","modified":"2024-08-21T16:28:38.105Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-1206","url":"https://pkg.go.dev/vuln/GO-2022-1206","licence":"CC-BY-4.0","modified":"2026-03-03T04:52:58.062Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-4318","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-4318","licence":"Public domain","modified":"2026-06-17T05:20:34.713Z"}],"updatedAt":"2026-11-25T22:58:19.625Z","epss":{"score":0.0029,"percentile":0.23238,"date":"2026-12-01T12:00:22.000Z"}}