CriticalVulnerability
GHSA-g76p-4vg5-f4qh: llm CLI tool contains a code injection vulnerability via `--functions` command-line argument
- Identifiers
- CVE-2026-31236GHSA-g76p-4vg5-f4qh
- Published
- Record updated
- Affected
- llm <= 0.27.1
- Fixed in
- No fixed version was stated when the source was last read.
Summary
The llm CLI tool through 0.27.1 has a critical code injection flaw in its --functions argument, which is meant to accept custom Python function definitions. The tool passes that code directly to exec() without sanitization, sandboxing, or restrictions. An attacker can craft a malicious llm command with arbitrary Python in --functions and use social engineering to get a victim to run it, gaining arbitrary code execution and potentially full control of the victim's system.
Mitigation
The source does not state a fix yet. Check the original advisory for updates.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- llmPyPILLM dependency since 2023-04-01, 1 tracked dependent
Related items
- MediumCVE-2026-143967: Wise Chat with AI unauthenticated stored cross-site scriptingSimilar attack, NVD/CVE Database
- MediumCVE-2026-135917: Apache Camel A2A component confused deputy via shared message headersSimilar attack, NVD/CVE Database
- MediumCVE-2026-107489: Improper Authentication vulnerability in Apache Camel A2A component. This issue affects Apache Camel: from 4.21.0…Similar attack, NVD/CVE Database
- MediumNSA urges immediate post-quantum shift after AI labs report cryptography breakthroughsSimilar attack, CSO Online
- LowPerplexity caught an AI attacker casing its cloudSimilar attack, CSO Online