Description
In its design for automatic terminal command execution, HAI Build Code Generator 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.
Published: 2026-03-30
Score: n/a
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution via Prompt Injection
Action: Patch
AI Analysis

Impact

The vulnerability allows an attacker to craft a prompt that tricks the HAI Build Code Generator into treating a malicious command as safe. By wrapping the command in a template that the model interprets as harmless, the system bypasses the user approval step and executes the command automatically. This results in arbitrary command execution, compromising confidentiality, integrity, and availability of the executing environment.

Affected Systems

The effect is confined to systems that host the HAI Build Code Generator, an automated terminal command executor used for code generation. No specific vendor, product name, or version information is listed, so all installations of this component are potentially affected until a patch is applied or controls are implemented.

Risk and Exploitability

No EPSS score or KEV status is available, leaving the specific exploitation likelihood unclear. Nonetheless, the flaw permits remote code execution with no user interaction required once the prompt injection succeeds, indicating a high severity risk. Since the exploit depends mainly on injecting malicious output into the model’s prompt, it can be performed by any actor who can influence the input to the generator, making the risk readily exploitable under the conditions described.

Generated by OpenCVE AI on March 31, 2026 at 05:42 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Check for an updated version of HAI Build Code Generator that fixes the prompt injection flaw.
  • If no patch is available, disable the automatic safe command execution feature or restrict it to a whitelist of approved commands.
  • Require explicit user approval for all generated commands regardless of model assessment.
  • Monitor command execution logs for unexpected or unauthorized commands.
  • Consider implementing additional runtime checks such as input sanitization or command validation layers.

Generated by OpenCVE AI on March 31, 2026 at 05:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 01 Apr 2026 02:15:00 +0000

Type Values Removed Values Added
Title Auto Command Execution Enables Remote Code Execution via Prompt Injection
Weaknesses CWE-77

Tue, 31 Mar 2026 03:00:00 +0000

Type Values Removed Values Added
Description In its design for automatic terminal command execution, HAI Build Code Generator 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.
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-03-30T20:40:44.039Z

Reserved: 2026-03-04T00:00:00.000Z

Link: CVE-2026-30308

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-03-30T21:17:09.107

Modified: 2026-03-30T21:17:09.107

Link: CVE-2026-30308

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-03-31T20:00:21Z

Weaknesses