Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-31236

published critical CVSS 3.1 · 9.8

llm: llm CLI tool: Arbitrary code execution via code injection in --functions argument

Title from Red Hat VEX

Published
12 May 2026, 00:00:00 UTC
Updated
15 Jul 2026, 01:09:28 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
n/a — n/an/a Affected Not stated mitre
Red Hat — rhoai/odh-model-controller-rhel9Red Hat OpenShift AI (RHOAI) Unaffected Not required redhat-SADP

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.

en · mitre · cna

en · redhat-SADP · adp

A flaw was found in the llm CLI tool. An attacker can exploit a code injection vulnerability by crafting a malicious command with arbitrary Python code in the `--functions` argument. If a victim is tricked into running this command, it leads to arbitrary code execution on their system, potentially granting the attacker full control.

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
9.8 / 10
Severity
critical
Provider
CISA-ADP · adp
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Additional Assessments

Additional normalized CVSS assessments
VersionScoreSeverityProviderVectorScenarios
3.1 7.3 high redhat-SADP · adp CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H —

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
n/a n/a n/a (affected) mitre · cna
Red Hat Red Hat OpenShift AI (RHOAI) Default: unaffected redhat-SADP · adp

Weaknesses

3
  • n/a (mitre · cna)
  • CWE-94 Improper Control of Generation of Code ('Code Injection') (redhat-SADP · adp)
  • CWE-94 CWE-94 Improper Control of Generation of Code ('Code Injection') (CISA-ADP · adp)

References

5

Provider assertions

3

mitre · cna

redhat-SADP · adp

llm: llm CLI tool: Arbitrary code execution via code injection in --functions argument

CISA-ADP · adp

CISA ADP Vulnrichment

Provenance

Schema
5.2
Searchable
yes
Content hash
39c428d9d844fa9b2c8308c27f95613bfe38675e1af4062cb241d3cbbfa57183
Ingested
23 Sep 2026, 09:09:24 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected