Security mailing lists by PureSourceCode

CVE-2026-31236

CRITICAL 9.8CVSS 3.1

llm CLI tool contains a code injection vulnerability via `--functions` command-line argument

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.

Published
12 May 2026
Last modified
16 Nov 2026
Assigned by
cve@mitre.org
NVD status
Awaiting Analysis
Weakness
CWE-94
Also known as
GHSA-g76p-4vg5-f4qhPYSEC-2026-400
Sources
NVDJSONOSV GHSA-g76p-4vg5-f4qhJSONOSV PYSEC-2026-400JSON

Scores

SourceScored byVersionScoreVector / decision
NVD 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) CVSS 3.1 CRITICAL 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
OSV GitHub CVSS 3.1 CRITICAL 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
OSV PyPA CVSS 3.1 CRITICAL 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 0b0ca135-0b70-47e7-9f44-1890c2a1c46c (Secondary) CVSS 3.1 HIGH 7.3 CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV PyPI llm <= 0.27.1

References

History

  • 25 Nov 2026 21:02 UTC · NVD: first stored (published 12 May 2026)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 29 Jun 2026)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 12 May 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.