CRI-O vulnerable to an arbitrary systemd property injectionGHSA-2cgq-h8xw-2v5j
HIGHFix: opencontainers/runc#4217GHSA-2cgq-h8xw-2v5j is a high-severity (CVSS 7.2) CWE-77 vulnerability in github.com/cri-o/cri-o. A fix is available for github.com/cri-o/cri-o — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-2cgq-h8xw-2v5j.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
github.com/cri-o/cri-o🐹github.com/cri-o/cri-o🐹github.com/cri-o/cri-oReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
On CRI-O, it looks like an arbitrary systemd property can be injected via a Pod annotation:
---
apiVersion: v1
kind: Pod
metadata:
name: poc-arbitrary-systemd-property-injection
annotations:
# I believe that ExecStart with an arbitrary command works here too,
# but I haven't figured out how to marshalize the ExecStart struct to gvariant string.
org.systemd.property.SuccessAction: "'poweroff-force'"
spec:
containers:
- name: hello
image: [quay.io/podman/hello](http://quay.io/podman/hello)
This means that any user who can create a pod with an arbitrary annotation may perform an arbitrary action on the host system.
Tested with CRI-O v1.24 on minikube. I didn't test the latest v1.29 because it is incompatible with minikube: https://github.com/kubernetes/minikube/pull/18367
Thanks to Cédric Clerget (GitHub ID @cclerget) for finding out that CRI-O just passes pod annotations to OCI annotations: https://github.com/opencontainers/runc/pull/3923#discussion_r1532292536
CRI-O has to filter out annotations that have the prefix "org.systemd.property."
See also:
- https://github.com/opencontainers/runtime-spec/blob/main/features.md#unsafe-annotations-in-configjson
- https://github.com/opencontainers/runc/pull/4217
Workarounds
Unfortunately, the only workarounds would involve an external mutating webhook to disallow these annotations
References
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/cri-o/cri-o | ≥ 1.29.0&&< 1.29.4 | 1.29.4go get github.com/cri-o/cri-o@v1.29.4 |
| 🐹Go | github.com/cri-o/cri-o | ≥ 1.28.0&&< 1.28.6 | 1.28.6go get github.com/cri-o/cri-o@v1.28.6 |
| 🐹Go | github.com/cri-o/cri-o | all versions | 1.27.6go get github.com/cri-o/cri-o@v1.27.6 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/cri-o/cri-o, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/cri-o/cri-o to 1.29.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-2cgq-h8xw-2v5j is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat OpenShift Container Platform 4.12 | cri-o-0:1.25.5-16.2.rhaos4.12.gitcb09013.el8 | RHSA-2024:2784 |
| Red Hat OpenShift Container Platform 4.13 | cri-o-0:1.26.5-16.2.rhaos4.13.git67e2a9d.el8 | RHSA-2024:3496 |
| Red Hat OpenShift Container Platform 4.14 | cri-o-0:1.27.6-2.rhaos4.14.gitb3bd0bf.el8 | RHSA-2024:2672 |
| Red Hat OpenShift Container Platform 4.15 | cri-o-0:1.28.6-2.rhaos4.15.git77bbb1c.el8 | RHSA-2024:2669 |
Frequently Asked Questions
Is GHSA-2cgq-h8xw-2v5j in your dependencies?
Find it across Go, including transitive dependencies.