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.
CVE-2026-31236
Score 9.8 from GitHub Security Advisory (severity: CRITICAL) published 2026-05-12. NVD baseline CVSS 9.8; sources differ by 0.0.
- High severity, but no confirmed exploitation yet
No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.
- CVSS v3
- 9.8
- EG Score
- 9.8(medium)
- EPSS
- 24.8%
- KEV
- Not listed
Published
May 12, 2026
Last Modified
July 15, 2026
Advisory Details (5)
Auto-updated Jul 16, 20262476636 – (CVE-2026-31236) CVE-2026-31236 llm: llm CLI tool: Arbitrary code execution via code injection in --functions argument
https://bugzilla.redhat.com/show_bug.cgi?id=2476636GitHub - simonw/llm: Access large language models from the command-line · GitHub
https://github.com/simonw/llmVendor Advisories for CVE-2026-31236(1)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
Patch Availability(1)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| pip | llm | — | ghsa |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(1 across 1 ecosystem)
PyPI(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| llm | 0.1 ... 0.9a1 (55 versions) | — | — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 11× in last 7d / 62× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
Showing the most recent 100 of 284 total refreshes for this CVE.
- 2026-07-16 17:03 UTCEPSS rescore
- 2026-07-16 17:03 UTCEPSS rescore
- 2026-07-15 16:57 UTCEPSS rescore
- 2026-07-15 16:57 UTCEPSS rescore
- 2026-07-15 02:00 UTCEPSS rescore
- 2026-07-15 02:00 UTCEPSS rescore
- 2026-07-13 22:30 UTCEPSS rescore
- 2026-07-13 06:13 UTCEPSS rescore
- 2026-07-13 06:13 UTCEPSS rescore
- 2026-07-12 05:46 UTCEPSS rescore
- 2026-07-11 08:27 UTCEPSS rescore
- 2026-07-09 19:10 UTCEPSS rescore
- 2026-07-08 15:15 UTCEPSS rescore
- 2026-07-07 13:46 UTCEPSS rescore
- 2026-07-06 16:27 UTCEPSS rescore
- 2026-07-06 16:27 UTCEPSS rescore
- 2026-07-06 02:23 UTCEPSS rescore
- 2026-07-06 02:23 UTCEPSS rescore
- 2026-07-05 02:30 UTCEPSS rescore
- 2026-07-04 06:31 UTCEPSS rescore
- 2026-07-01 15:06 UTCEPSS rescore
- 2026-06-30 23:22 UTCEPSS rescore
- 2026-06-29 14:06 UTCEPSS rescore
- 2026-06-29 14:06 UTCEPSS rescore
- 2026-06-28 14:07 UTCEPSS rescore
Show 75 moreShow fewer
- 2026-06-28 14:07 UTCEPSS rescore
- 2026-06-28 13:27 UTCEG score recompute
- 2026-06-28 13:27 UTCGHSA enrichment
- 2026-06-28 08:22 UTCEG score recompute
- 2026-06-28 08:22 UTCGHSA enrichment
- 2026-06-28 04:56 UTCEPSS rescore
- 2026-06-28 04:56 UTCEPSS rescore
- 2026-06-28 02:17 UTCEG score recompute
- 2026-06-28 02:17 UTCGHSA enrichment
- 2026-06-27 13:16 UTCEG score recompute
- 2026-06-27 13:16 UTCGHSA enrichment
- 2026-06-27 08:23 UTCEG score recompute
- 2026-06-27 08:23 UTCGHSA enrichment
- 2026-06-27 03:08 UTCEPSS rescore
- 2026-06-26 20:52 UTCEG score recompute
- 2026-06-26 20:52 UTCGHSA enrichment
- 2026-06-26 04:01 UTCEG score recompute
- 2026-06-26 04:01 UTCGHSA enrichment
- 2026-06-25 21:54 UTCEG score recompute
- 2026-06-25 21:53 UTCGHSA enrichment
- 2026-06-25 13:49 UTCEPSS rescore
- 2026-06-25 13:49 UTCEPSS rescore
- 2026-06-24 14:05 UTCEPSS rescore
- 2026-06-23 21:33 UTCEPSS rescore
- 2026-06-23 21:33 UTCEPSS rescore
- 2026-06-22 14:25 UTCEPSS rescore
- 2026-06-22 14:25 UTCEPSS rescore
- 2026-06-21 14:56 UTCEPSS rescore
- 2026-06-21 14:56 UTCEPSS rescore
- 2026-06-21 01:59 UTCEPSS rescore
- 2026-06-19 19:25 UTCEPSS rescore
- 2026-06-19 19:25 UTCEPSS rescore
- 2026-06-18 17:52 UTCEPSS rescore
- 2026-06-18 17:52 UTCEPSS rescore
- 2026-06-17 17:53 UTCEPSS rescore
- 2026-06-17 05:09 UTCEG score recompute
- 2026-06-17 05:09 UTCGHSA enrichment
- 2026-06-17 00:04 UTCEG score recompute
- 2026-06-17 00:03 UTCGHSA enrichment
- 2026-06-16 17:52 UTCEPSS rescore
- 2026-06-16 11:35 UTCEG score recompute
- 2026-06-16 11:35 UTCGHSA enrichment
- 2026-06-16 06:05 UTCEG score recompute
- 2026-06-16 06:05 UTCGHSA enrichment
- 2026-06-15 17:49 UTCEPSS rescore
- 2026-06-15 04:25 UTCEG score recompute
- 2026-06-15 04:25 UTCGHSA enrichment
- 2026-06-15 00:05 UTCEG score recompute
- 2026-06-15 00:05 UTCGHSA enrichment
- 2026-06-14 23:18 UTCEPSS rescore
- 2026-06-14 19:42 UTCEG score recompute
- 2026-06-14 19:42 UTCGHSA enrichment
- 2026-06-14 15:22 UTCEG score recompute
- 2026-06-14 15:22 UTCGHSA enrichment
- 2026-06-14 10:53 UTCEG score recompute
- 2026-06-14 10:53 UTCGHSA enrichment
- 2026-06-14 06:33 UTCEG score recompute
- 2026-06-14 06:32 UTCGHSA enrichment
- 2026-06-14 00:55 UTCEG score recompute
- 2026-06-14 00:55 UTCGHSA enrichment
- 2026-06-13 23:00 UTCEPSS rescore
- 2026-06-13 06:53 UTCEG score recompute
- 2026-06-13 06:53 UTCGHSA enrichment
- 2026-06-13 01:38 UTCEG score recompute
- 2026-06-13 01:38 UTCGHSA enrichment
- 2026-06-12 23:12 UTCEPSS rescore
- 2026-06-12 23:12 UTCEPSS rescore
- 2026-06-12 21:18 UTCEG score recompute
- 2026-06-12 21:18 UTCGHSA enrichment
- 2026-06-12 16:57 UTCEG score recompute
- 2026-06-12 16:57 UTCGHSA enrichment
- 2026-06-12 11:06 UTCEG score recompute
- 2026-06-12 11:06 UTCGHSA enrichment
- 2026-06-12 06:46 UTCEG score recompute
- 2026-06-12 06:46 UTCGHSA enrichment
Related CVEs(same CWE)
Same CWE
10 shownCWE-94
- CVE-2006-1359NVD 0.0EG 9.0EPSS 99%NONE
- CVE-2005-1921NVD 0.0EG 9.0EPSS 100%NONE
- CVE-2005-3302EG 7.3HIGH
- CVE-2005-1876EG 4.5MEDIUM
- CVE-2003-1599EG 0.0NONE
- CVE-2006-1318EG 0.0EPSS 96%NONE
- CVE-2006-1301EG 0.0EPSS 95%NONE
- CVE-2006-1308EG 0.0EPSS 95%NONE
- CVE-2006-1309EG 0.0EPSS 95%NONE
- CVE-2006-1304EG 0.0EPSS 95%NONE
Frequently asked(5)
What is CVE-2026-31236?
When was CVE-2026-31236 disclosed?
Is CVE-2026-31236 actively exploited?
What is the CVSS score of CVE-2026-31236?
How do I remediate CVE-2026-31236?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2026-31236
Is Your Infrastructure Affected by CVE-2026-31236?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.