CVE-2026-30304
JSON

9.6critical

In its design for automatic terminal command execution, AI Code offers two options: Execute safe commands and execute all commands.

Severity
9.6critical CVSS:3.1 by CISA-ADP
Exploit likelihood
0.52% (higher than 45% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre

Description

In its design for automatic terminal command execution, AI Code offers two options: Execute safe commands and execute all commands. The description for the former states that commands determined by the model to be safe will be automatically executed, whereas if the model judges a command to be potentially destructive, it still requires user approval. However, this design is highly susceptible to prompt injection attacks. An attacker can employ a generic template to wrap any malicious command and mislead the model into misclassifying it as a 'safe' command, thereby bypassing the user approval requirement and resulting in arbitrary command execution.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
tianguaduizhang ai_codeup to 3.12.4NVD

Classification

CWE-20

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

In its design for automatic terminal command execution, AI Code offers two options: Execute safe commands and execute all commands. The description for the former states that commands determined by the model to be safe will be automatically executed, whereas if the model judges a command to be potentially destructive, it still requires user approval. However, this design is highly susceptible to prompt injection attacks. An attacker can employ a generic template to wrap any malicious command and mislead the model into misclassifying it as a 'safe' command, thereby bypassing the user approval requirement and resulting in arbitrary command execution.

NVD (es)

En su diseño para la ejecución automática de comandos de terminal, AI Code ofrece dos opciones: Ejecutar comandos seguros y ejecutar todos los comandos. La descripción de la primera establece que los comandos que el modelo determine como seguros se ejecutarán automáticamente, mientras que si el modelo juzga un comando como potencialmente destructivo, aún requiere la aprobación del usuario. Sin embargo, este diseño es altamente susceptible a ataques de inyección de prompts. Un atacante puede emplear una plantilla genérica para envolver cualquier comando malicioso y engañar al modelo para que lo clasifique erróneamente como un comando ’seguro’, eludiendo así el requisito de aprobación del usuario y resultando en la ejecución arbitraria de comandos.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-30304 changed 2026-03-27CVE Terms of Use
NVDCVE-2026-30304 changed 2026-11-11Public domain