{"cve":"CVE-2026-31236","nvd":{"published":"2026-05-12T18:16:51.977","modified":"2026-07-15T02:19:46.747","status":"Awaiting Analysis","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-94"],"references":["https://github.com/simonw/llm","https://www.notion.so/CVE-2026-31236-35d1e139318881a4a0f1fffcf671f7e3","https://access.redhat.com/security/cve/CVE-2026-31236","https://bugzilla.redhat.com/show_bug.cgi?id=2476636","https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31236.json"],"products":[],"source":"nvd","synced_at":"2026-10-19T22:35:16.954578616+00:00"},"epss":{"cve":"CVE-2026-31236","score":0.00327,"percentile":0.25805,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-g76p-4vg5-f4qh","url":"https://osv.dev/vulnerability/GHSA-g76p-4vg5-f4qh","summary":"llm CLI tool contains a code injection vulnerability via `--functions` command-line argument","modified":"2026-06-29T12:26:52.414776769Z","packages":[{"ecosystem":"PyPI","name":"llm","purl":"pkg:pypi/llm","ranges":["<=0.27.1"],"fixed":[]}]},{"id":"PYSEC-2026-400","url":"https://osv.dev/vulnerability/PYSEC-2026-400","summary":"llm CLI tool contains a code injection vulnerability via `--functions` command-line argument","modified":"2026-07-01T20:22:56.637769Z","packages":[{"ecosystem":"PyPI","name":"llm","purl":"pkg:pypi/llm","ranges":["<=0.27.1"],"fixed":[]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}