Vulnerability · Published May 12, 2026 · Assigned by mitre

CVE-2026-31236

Critical 9.8

In plain English

A critical-severity code injection in the llm package (Debian). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 26% of all known vulnerabilities).

Severity (CVSS 3.1)9.8Critical
Exploit odds (30 days)0.3%top 74.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13llmno fix listedDEBIAN-CVE-2026-31236
Debian:14llmno fix listedDEBIAN-CVE-2026-31236
PyPIllmno fix listedGHSA-g76p-4vg5-f4qh
PyPIllmno fix listedPYSEC-2026-400
Ubuntu:25.10llmno fix listedUBUNTU-CVE-2026-31236
Ubuntu:26.04:LTSllmno fix listedUBUNTU-CVE-2026-31236

Affected products (as reported)

VendorProductVersions
n/a n/a n/a

Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References