CVE-2026-31236Red Hat OpenShift AI (RHOAI)
Critical 9.8 No auth needed
Follow: this CVE · Red Hat · Red Hat OpenShift AI (RHOAI) We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- —
- Auth required
- No
- Published
- May 12, 2026
- Updated
- Jul 15, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-94
- SSVC (CISA)
- Exploitation: none · Automatable: yes · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
The llm CLI tool thru 0.27.1 contains a critical code injection vulnerability via its --functions command-line argument. This argument is intended to allow users to provide custom Python function definitions. However, the tool directly executes the provided code using the unsafe exec() function without any sanitization, sandboxing, or security restrictions. An attacker can exploit this by crafting a malicious llm command with arbitrary Python code in the --functions argument and using social engineering to trick a victim into running it. This leads to arbitrary code execution on the victim's system, potentially granting the attacker full control.
What to do
- Apply the vendor's security update for Red Hat OpenShift AI (RHOAI).
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | llm |
≤ 0.27.1 |
no fixed version | — |
| PyPI | llm |
≤ 0.27.1 |
no fixed version | — |
Per OSV / GitHub Advisories (GHSA-g76p-4vg5-f4qh, PYSEC-2026-400). Check the version in your lockfile before upgrading.
Affected products
- Red Hat · Red Hat OpenShift AI (RHOAI)
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.