Skip to main content
VulnerabilityPublished Updated

CVE-2026-31236: llm CLI tool contains a code injection vulnerability via `--functions` command-line argument

Affects llmSource GCVE Database

0
Compare
Authoritative record:CVE-2026-31236· Critical 9.8

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

CVSS 3.1 base score
9.8Critical
How severe the flaw is on the 0–10 CVSS scale.
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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 12 May 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Homebrewllmpkg:brew/llmOther threatsAffected
  • >=0.6 <0.28
Fixed in
  • 0.28

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.

References

Community reviews

Loading reviews…