CVE-2026-31236: llm CLI tool contains a code injection vulnerability via `--functions` command-line argument
Affects llmSource GCVE Database
Not known to be exploited · CVSS 9.8 Critical : upgrade to 0.28 as a priority.
Data as of 4 Nov 2026, 20:35 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.
- Patch
- Available – fixed in 0.28
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
Weaponized: 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 4 Nov 2026.
What to do
Upgrade llm to 0.28.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewllmpkg:brew/llmOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available in llm version 0.28 that fixes this vulnerability. Users should upgrade to version 0.28 or later to remediate the issue. Until upgraded, users should avoid running untrusted commands with the --functions argument and be cautious of social engineering attempts involving the llm CLI tool.
Description
The llm CLI tool up to version 0.27.1 has a critical code injection vulnerability in its --functions command-line argument. This argument allows users to input custom Python function definitions, but the tool unsafely executes this code using Python's exec() without any sanitization or restrictions. An attacker can exploit this by tricking a user into running a malicious command with arbitrary Python code, resulting in arbitrary code execution on the victim's system and potentially full system compromise. The vulnerability is fixed in version 0.28.