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.

Data as of 16 Nov 2026, 15:20 UTC

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

What to do

Affected software

ProductAffectedFixed in
PyPIllmAffected
  • <=0.27.1
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

To mitigate the risk, users should run the llm CLI tool inside a sandboxed environment such as a container or virtual machine to isolate potential malicious code execution. Avoid running untrusted commands with the --functions argument and educate users about the risks of executing commands from untrusted sources.

Description

The llm CLI tool up to version 0.27.1 contains a critical code injection vulnerability via its --functions command-line argument. This argument allows users to provide custom Python code, which the tool executes directly using exec() without any sanitization or sandboxing. An attacker can exploit this by tricking a user into running a malicious command, leading to arbitrary code execution and potentially full system compromise. The vulnerability requires local access and user interaction to execute the crafted command. Red Hat rates this flaw as Important due to its local attack vector and required user interaction. No official patch is currently available, but running the tool inside a sandbox such as a container or VM is recommended to mitigate risk.

References

Community reviews

Loading reviews…