CVE-2026-31236: llm CLI tool thru · Code Injection
Source CVE Database V5
Not known to be exploited · CVSS 9.8 Critical.
Data as of 26 Oct 2026, 17:16 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 25% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 12 May 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
AI-suggested
Until a fix is available, users should avoid running untrusted commands with the --functions argument and apply strict operational controls to prevent social engineering attacks that could lead to execution of malicious code via this vector.
Description
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.
References
- github.com/simonw/llm (opens in a new tab)
- notion.so/CVE-2026-31236-35d1e139318881a4a0f1fffcf671f7e3 (opens in a new tab)
- access.redhat.com/security/cve/CVE-2026-31236 (opens in a new tab)
- bugzilla.redhat.com/show_bug.cgi?id=2476636 (opens in a new tab)
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31236.json (opens in a new tab)