The llm CLI tool thru 0.27.1 contains a critical code injection vulnerability via its…
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- No fix listed
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA and GitHub. Impact type from CWE-94.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | llm (PyPI) | up to 0.27.1 | — | No fix listed | GHSA-g76p-4vg5-f4qh |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- llm (PyPI) Vendor— Affected up to 0.27.1 Fixed in — No fix listed GHSA-g76p-4vg5-f4qh
Remediation
No fixed version listed by the sources yet.
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
Not affected: 1 product
- Red Hat OpenShift AI (RHOAI)
Timeline
- 2026-10-02 Threatist record created from CVE-2026-31236
- 2026-10-03 Alias added: GHSA-g76p-4vg5-f4qh
References
Sources
- CVE-2026-31236 · CVE Program
- CVE-2026-31236 · NVD
- FIRST EPSS
- GHSA-g76p-4vg5-f4qh · GitHub Advisory Database · CC BY 4.0
- CVE-2026-31236 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences