CVE-2026-31236: n/a
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.
AI Analysis
Technical Summary
CVE-2026-31236 is a critical code injection vulnerability in the llm CLI tool versions up to 0.27.1. The vulnerability arises because the --functions argument accepts arbitrary Python code and executes it directly with exec() without any sandboxing or input validation. This allows an attacker to execute arbitrary code on the victim's system if the victim runs a crafted command containing malicious code in the --functions argument. The vulnerability has a CVSS 3.1 score of 9.8, indicating critical severity with network attack vector, no privileges required, no user interaction, and full confidentiality, integrity, and availability impact. No official patch or remediation level is currently stated in the vendor advisory, and no known exploits in the wild have been reported. The Red Hat advisory URL is provided but does not explicitly mention a fix or mitigation.
Potential Impact
Successful exploitation results in arbitrary code execution on the victim's system with the privileges of the user running the llm tool. This can lead to full system compromise, including confidentiality, integrity, and availability impacts. The vulnerability is exploitable remotely via crafted command-line input if an attacker can convince a user to run the malicious command.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory at https://access.redhat.com/security/cve/CVE-2026-31236 for current remediation guidance. Until a fix is available, users should avoid running untrusted commands with the --functions argument and apply strict operational controls to prevent social engineering attacks that could lead to execution of malicious code via this vector.
CVE-2026-31236: n/a
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 v3.1
Score 9.8critical
Affected software
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-31236 is a critical code injection vulnerability in the llm CLI tool versions up to 0.27.1. The vulnerability arises because the --functions argument accepts arbitrary Python code and executes it directly with exec() without any sandboxing or input validation. This allows an attacker to execute arbitrary code on the victim's system if the victim runs a crafted command containing malicious code in the --functions argument. The vulnerability has a CVSS 3.1 score of 9.8, indicating critical severity with network attack vector, no privileges required, no user interaction, and full confidentiality, integrity, and availability impact. No official patch or remediation level is currently stated in the vendor advisory, and no known exploits in the wild have been reported. The Red Hat advisory URL is provided but does not explicitly mention a fix or mitigation.
Potential Impact
Successful exploitation results in arbitrary code execution on the victim's system with the privileges of the user running the llm tool. This can lead to full system compromise, including confidentiality, integrity, and availability impacts. The vulnerability is exploitable remotely via crafted command-line input if an attacker can convince a user to run the malicious command.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory at https://access.redhat.com/security/cve/CVE-2026-31236 for current remediation guidance. Until a fix is available, users should avoid running untrusted commands with the --functions argument and apply strict operational controls to prevent social engineering attacks that could lead to execution of malicious code via this vector.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- mitre
- Date Reserved
- 2026-03-09T00:00:00.000Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-31236","vendor":"Red Hat"}]
Threat ID: 6a036531cbff5d861008c1bf
Added to database: 05/12/2026, 17:36:49 UTC
Last enriched: 07/15/2026, 13:24:59 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 54
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.