CVE-2022-0811: Github.com/cri o/cri o Code Injection Vulnerability
HIGHCVE-2022-0811 is a HIGH (CVSS 8.8) code injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Github.com/cri o/cri o libraries in the Go ecosystem. The issue involves code injection in cri-o. Remediation is available by upgrading affected packages to version 1.19.6, 1.20.7, 1.21.6, 1.22.3, 1.23.2.
CVE-2022-0811 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2022-0811
To remediate this vulnerability, upgrade all affected Github.com/cri o/cri o dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/cri-o/cri-o to 1.19.6
Upgrade github.com/cri-o/cri-o to 1.20.7
Upgrade github.com/cri-o/cri-o to 1.21.6
Upgrade github.com/cri-o/cri-o to 1.22.3
Upgrade github.com/cri-o/cri-o to 1.23.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/cri-o/cri-o
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-0811, inspect your project dependencies for Github.com/cri o/cri o:
inspect dependencies for github.com/cri-o/cri-o
Analyze the terminal output to locate any version of Github.com/cri o/cri o in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.19.6), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Github.com/cri o/cri o, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-0811 Affected Github.com/cri o/cri o Versions
5 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/cri-o/cri-o
|
Go |
≥ 1.19.0
< 1.19.6
|
1.19.6
|
|
github.com/cri-o/cri-o
|
Go |
≥ 1.20.0
< 1.20.7
|
1.20.7
|
|
github.com/cri-o/cri-o
|
Go |
≥ 1.21.0
< 1.21.6
|
1.21.6
|
|
github.com/cri-o/cri-o
|
Go |
≥ 1.22.0
< 1.22.3
|
1.22.3
|
|
github.com/cri-o/cri-o
|
Go |
≥ 1.23.0
< 1.23.2
|
1.23.2
|
References
Frequently Asked Questions
What is CVE-2022-0811?
Which Github.com/cri o/cri o versions are affected?
What version fixes CVE-2022-0811?
Is github.com/cri-o/cri-o affected?
What is the CVSS score of CVE-2022-0811?
What CWE is associated with CVE-2022-0811?
How can I check Go dependencies for CVE-2022-0811?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6x2m-w449-qwx7",
"modified" : "2022-03-18T17:47:49Z",
"published" : "2022-03-15T20:13:38Z",
"aliases" : [ "CVE-2022-0811" ],
"summary" : "Code Injection in CRI-O",
"details" : "### Impact\nA flaw introduced in CRI-O version 1.19 which an attacker can use to bypass the safeguards and set arbitrary kernel parameters on the host. As a result, anyone with rights to deploy a pod on a Kubernetes cluster that uses the CRI-O runtime can abuse the `kernel.core_pattern` kernel parameter to achieve container escape and arbitrary code execution as root on any node in the cluster.\n\n### Patches\nThe patches will be present in 1.19.6, 1.20.7, 1.21.6, 1.22.3, 1.23.2, 1.24.0\n\n### Workarounds\n- Users can set manage_ns_lifecycle to false, which causes the sysctls to be configured by the OCI runtime, which typically filter these cases. This option is available in 1.20 and 1.19. Newer versions don't have this option.\n- An admission webhook could be created to deny pods that specify a `+` in the sysctl value of a pod.\n- A [PodSecurityPolicy](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#podsecuritypolicy) [deprecated] could be created, specifying all sysctls as forbidden like so: \n```\napiVersion: policy/v1beta1\nkind: PodSecurityPolicy\nmetadata:\n name: sysctl-psp\nspec:\n forbiddenSysctls:\n - \"*\"\n```\nHowever, this option will not work if any sysctls are required by any pods in the cluster.\n\n\n### Credits\nCredit for finding this vulnerability goes to John Walker and Manoj Ahuje of Crowdstrike. The CRI-O community deeply thanks them for the report.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [the CRI-O repo](http://github.com/cri-o/cri-o/issues)\n* To make a report, email your vulnerability to the private\n[cncf-crio-security@lists.cncf.io](mailto:cncf-crio-security@lists.cncf.io) list\nwith the security details and the details expected for [all CRI-O bug\nreports](https://github.com/cri-o/cri-o/blob/main/.github/ISSUE_TEMPLATE/bug-report.yml).\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cri-o/cri-o"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.19.0"
}, {
"fixed" : "1.19.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cri-o/cri-o"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.20.0"
}, {
"fixed" : "1.20.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cri-o/cri-o"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.21.0"
}, {
"fixed" : "1.21.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cri-o/cri-o"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.22.0"
}, {
"fixed" : "1.22.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cri-o/cri-o"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.23.0"
}, {
"fixed" : "1.23.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cri-o/cri-o/security/advisories/GHSA-6x2m-w449-qwx7"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-0811"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2022-0811"
}, {
"type" : "WEB",
"url" : "https://bugs.gentoo.org/835336"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2059475"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cri-o/cri-o"
}, {
"type" : "WEB",
"url" : "https://www.crowdstrike.com/blog/cr8escape-zero-day-vulnerability-discovered-in-cri-o-container-engine-cve-2022-0811"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-03-15T20:13:38Z",
"nvd_published_at" : "2022-03-16T15:15:00Z"
}
}