PT-2026-40123 · Llm · Llm
Published
2026-05-12
·
Updated
2026-05-12
·
CVE-2026-31236
CVSS v3.1
9.8
Critical
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
llm versions prior to 0.27.2
Description
A code injection issue exists in the llm CLI tool. The tool uses the unsafe
exec() function to process custom Python function definitions provided through the --functions command-line argument without sanitization, sandboxing, or security restrictions. An attacker can exploit this by tricking a user into executing a malicious command containing arbitrary Python code in the --functions argument, leading to arbitrary code execution on the system.Recommendations
Update to version 0.27.2 or later.
As a temporary workaround, avoid using the
--functions argument with untrusted input.Fix
Code Injection
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Llm