# CVE-2024-3154: Cri-o: arbitrary command injection via pod annotation

> Attackers can execute arbitrary commands on the host by injecting systemd properties via pod annotations in CRI-O.

- **Severity:** High 7.2 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Apr 2024
- **Updated:** 24 Aug 2026
- **Also known as:** AZL-42307, GHSA-2cgq-h8xw-2v5j, GO-2024-2791, OESA-2024-1671, OESA-2024-1675, OESA-2024-1688, RHSA-2024:3496, openSUSE-SU-2024:14334-1

## What is CVE-2024-3154?

CVE-2024-3154 is a high-severity command injection vulnerability in Red Hat OpenShift Container Platform 3.11, published on 26 Apr 2024. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

A flaw was found in cri-o, where an arbitrary systemd property can be injected via a Pod annotation. Any user who can create a pod with an arbitrary annotation may perform an arbitrary action on the host system.

Weakness: CWE-77 (Improper Neutralization of Special Elements used in a Command)

## Which versions are affected by CVE-2024-3154?

7 open source packages ship an affected version, including github.com/cri-o/cri-o.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/cri-o/cri-o` | Go | All versions | 1.27.6, 1.28.6, 1.29.4 |
| `github.com/cri-o/cri-o` | Go | All versions | 1.27.6 |
| `github.com/cri-o/cri-o` | Go | All versions | 1.27.6 |
| `github.com/cri-o/cri-o` | Go | From 1.28.0 | 1.28.6 |
| `github.com/cri-o/cri-o` | Go | From 1.28.0 | 1.28.6 |
| `github.com/cri-o/cri-o` | Go | From 1.29.0 | 1.29.4 |
| `github.com/cri-o/cri-o` | Go | From 1.29.0 | 1.29.4 |
| `cri-o` | Red Hat:openshift:4.13::el8 | All versions | 0:1.26.5-16.2.rhaos4.13.git67e2a9d.el8 |
| `cri-o-debuginfo` | Red Hat:openshift:4.13::el8 | All versions | 0:1.26.5-16.2.rhaos4.13.git67e2a9d.el8 |
| `cri-o-debugsource` | Red Hat:openshift:4.13::el8 | All versions | 0:1.26.5-16.2.rhaos4.13.git67e2a9d.el8 |
| `cri-o` | Red Hat:openshift:4.13::el9 | All versions | 0:1.26.5-16.2.rhaos4.13.git67e2a9d.el9 |
| `cri-o-debuginfo` | Red Hat:openshift:4.13::el9 | All versions | 0:1.26.5-16.2.rhaos4.13.git67e2a9d.el9 |
| `cri-o-debugsource` | Red Hat:openshift:4.13::el9 | All versions | 0:1.26.5-16.2.rhaos4.13.git67e2a9d.el9 |
| `grype` | openSUSE:Tumbleweed | All versions | 0.80.1-1.1 |

## How do I fix CVE-2024-3154?

Upgrade github.com/cri-o/cri-o to a fixed version for your release line: 1.27.6, 1.28.6 or 1.29.4.

## Is CVE-2024-3154 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-3154 and fix it if it is affected.

What it is: CVE-2024-3154 is a high-severity command injection vulnerability in Red Hat OpenShift Container Platform 3.11, published on 26 Apr 2024. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-3154 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/cri-o/cri-o (Go): affected all versions; fixed in 1.27.6, 1.28.6, 1.29.4
- github.com/cri-o/cri-o (Go): affected all versions; fixed in 1.27.6
- github.com/cri-o/cri-o (Go): affected all versions; fixed in 1.27.6
- github.com/cri-o/cri-o (Go): affected from 1.28.0; fixed in 1.28.6
- github.com/cri-o/cri-o (Go): affected from 1.28.0; fixed in 1.28.6
- github.com/cri-o/cri-o (Go): affected from 1.29.0; fixed in 1.29.4
- github.com/cri-o/cri-o (Go): affected from 1.29.0; fixed in 1.29.4

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-2024-3154/ (Markdown: https://insights.sbomify.com/CVE-2024-3154/index.md)
```

## Sources

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

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