# CVE-2022-0811: Code Injection in CRI-O

> Attackers with pod deployment rights can escape containers and execute arbitrary code as root on cluster nodes via CRI-O kernel option flaws.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Mar 2022
- **Updated:** 2 Aug 2024
- **Also known as:** AZL-37070, GHSA-6x2m-w449-qwx7, GO-2022-0354, RHSA-2022:0810, RHSA-2022:0860

## What is CVE-2022-0811?

CVE-2022-0811 is a high-severity code injection vulnerability in CRI-O, published on 16 Mar 2022. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

A flaw was found in CRI-O in the way it set kernel options for a pod. This issue allows anyone with rights to deploy a pod on a Kubernetes cluster that uses the CRI-O runtime to achieve a container escape and arbitrary code execution as root on the cluster node, where the malicious pod was deployed.

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2022-0811?

11 open source packages ship an affected version, including github.com/cri-o/cri-o. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/cri-o/cri-o` | Go | From 1.19.0 | 1.19.6, 1.20.7, 1.21.6, 1.22.3, 1.23.2 |
| `github.com/cri-o/cri-o` | Go | From 1.19.0 | 1.19.6 |
| `github.com/cri-o/cri-o` | Go | From 1.19.0 | 1.19.6 |
| `github.com/cri-o/cri-o` | Go | From 1.20.0 | 1.20.7 |
| `github.com/cri-o/cri-o` | Go | From 1.20.0 | 1.20.7 |
| `github.com/cri-o/cri-o` | Go | From 1.21.0 | 1.21.6 |
| `github.com/cri-o/cri-o` | Go | From 1.21.0 | 1.21.6 |
| `github.com/cri-o/cri-o` | Go | From 1.22.0 | 1.22.3 |
| `github.com/cri-o/cri-o` | Go | From 1.22.0 | 1.22.3 |
| `github.com/cri-o/cri-o` | Go | From 1.23.0 | 1.23.2 |
| `github.com/cri-o/cri-o` | Go | From 1.23.0 | 1.23.2 |
| `cri-o` | Red Hat:openshift:4.10::el7 | All versions | 0:1.23.1-12.rhaos4.10.git1607c6e.el7 |
| `cri-o-debuginfo` | Red Hat:openshift:4.10::el7 | All versions | 0:1.23.1-12.rhaos4.10.git1607c6e.el7 |
| `cri-o` | Red Hat:openshift:4.10::el8 | All versions | 0:1.23.1-12.rhaos4.10.git1607c6e.el8 |
| `cri-o-debuginfo` | Red Hat:openshift:4.10::el8 | All versions | 0:1.23.1-12.rhaos4.10.git1607c6e.el8 |
| `cri-o-debugsource` | Red Hat:openshift:4.10::el8 | All versions | 0:1.23.1-12.rhaos4.10.git1607c6e.el8 |
| `cri-o` | Red Hat:openshift:4.9::el7 | All versions | 0:1.22.2-3.rhaos4.9.gitb030be8.el7 |
| `cri-o-debuginfo` | Red Hat:openshift:4.9::el7 | All versions | 0:1.22.2-3.rhaos4.9.gitb030be8.el7 |
| `cri-o` | Red Hat:openshift:4.9::el8 | All versions | 0:1.22.2-3.rhaos4.9.gitb030be8.el8 |
| `cri-o-debuginfo` | Red Hat:openshift:4.9::el8 | All versions | 0:1.22.2-3.rhaos4.9.gitb030be8.el8 |
| `cri-o-debugsource` | Red Hat:openshift:4.9::el8 | All versions | 0:1.22.2-3.rhaos4.9.gitb030be8.el8 |

Products: Kubernetes Cri-O.

## How do I fix CVE-2022-0811?

Upgrade github.com/cri-o/cri-o to a fixed version for your release line: 1.19.6, 1.20.7, 1.21.6 or 1.22.3.

## Is CVE-2022-0811 being exploited?

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

Public exploit code:

- Simple webhook to block exploitation of CVE-2022-0811 (github_poc): https://github.com/spiarh/webhook-cve-2022-0811

## Other vulnerabilities in CRI-O

- [CVE-2018-1000400](https://insights.sbomify.com/CVE-2018-1000400/): Privilege escalation in n/a (high 8.8)
- [CVE-2024-5154](https://insights.sbomify.com/CVE-2024-5154/): Cri-o: malicious container can create symlink on host (high 8.1)
- [CVE-2022-2995](https://insights.sbomify.com/CVE-2022-2995/): CRI-O incorrect handling of supplementary groups may lead to sensitive information disclosure (high 7.1)
- [CVE-2022-3466](https://insights.sbomify.com/CVE-2022-3466/): Cri-o: security regression of cve-2022-27652 (medium 4.8)
- [CVE-2022-0532](https://insights.sbomify.com/CVE-2022-0532/): Incorrect Permission Assignment for Critical Resource in CRI-O (medium 4.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-0811 and fix it if it is affected.

What it is: CVE-2022-0811 is a high-severity code injection vulnerability in CRI-O, published on 16 Mar 2022. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-0811 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/cri-o/cri-o (Go): affected from 1.19.0; fixed in 1.19.6, 1.20.7, 1.21.6, 1.22.3, 1.23.2
- github.com/cri-o/cri-o (Go): affected from 1.19.0; fixed in 1.19.6
- github.com/cri-o/cri-o (Go): affected from 1.19.0; fixed in 1.19.6
- github.com/cri-o/cri-o (Go): affected from 1.20.0; fixed in 1.20.7
- github.com/cri-o/cri-o (Go): affected from 1.20.0; fixed in 1.20.7
- github.com/cri-o/cri-o (Go): affected from 1.21.0; fixed in 1.21.6
- github.com/cri-o/cri-o (Go): affected from 1.21.0; fixed in 1.21.6
- github.com/cri-o/cri-o (Go): affected from 1.22.0; fixed in 1.22.3
- github.com/cri-o/cri-o (Go): affected from 1.22.0; fixed in 1.22.3
- github.com/cri-o/cri-o (Go): affected from 1.23.0; fixed in 1.23.2
- github.com/cri-o/cri-o (Go): affected from 1.23.0; fixed in 1.23.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-0811/ (Markdown: https://insights.sbomify.com/CVE-2022-0811/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-0811
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-0811
- OSV: https://osv.dev/vulnerability/CVE-2022-0811

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-0811/
Summaries are generated and may contain mistakes; the official description above is the record.
