Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker embeds payload in repository file content
-
DeliveryVictim opens repository with Plandex CLI
-
ExploitPoisoned content steers model output to propose path-traversing filename
-
InstallVictim confirms apply operation
-
C2ApplyFiles writes payload outside project root
-
ExecuteShell rc or cron file overwritten
-
ImpactPayload executes on next terminal open
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim to be running Plandex 2.2.1 CLI locally and to invoke the ApplyFiles workflow to apply AI-generated file changes to their working tree. The attacker must control content that is ingested as AI model context - either through files committed to a repository the victim opens with Plandex, or through another channel that injects attacker-controlled text into the model's context window. The victim must confirm the apply operation (UI:P), which provides a narrow window for detection if the developer carefully reviews proposed file paths. Exploitation is fully local: it affects only the victim's own filesystem under their user account and does not propagate to remote systems or other users without additional post-exploitation steps. No authentication to any external service is required on the attacker's part. |
| Impact | The CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P, score 8.5) characterizes this as a local attack requiring user interaction but no privileges. Real-world risk is meaningful for development teams that routinely clone and analyze untrusted third-party or community repositories with AI coding tools. The AT:N metric may modestly understate attack complexity: reliably steering a language model to produce a specific path-traversing filename is probabilistic and depends on model version and prompt structure, which argues for AT:P in a more conservative assessment. That said, because the attacker controls the file content fed as context, the influence vector is concrete rather than speculative. The absence of a KEV listing and the lack of a confirmed public exploit temper urgency relative to the raw score. Impact is bounded to the victim's local workstation and user-account privileges, limiting lateral spread compared to network-reachable vulnerabilities. No public exploit has been identified at time of analysis, and exploitation requires the victim to actively invoke the apply workflow. |
| Exploit ScenarioDerived | An attacker publishes a malicious open-source repository containing a crafted file whose content is designed to prompt the AI model into proposing a new file at a path such as '../../.bashrc' with attacker-controlled shell commands as its content. When a developer runs Plandex against this repository and applies the AI-suggested changes, the ApplyFiles function writes the payload to the developer's shell initialization file without raising an error. The injected commands execute silently the next time the developer opens a terminal session. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 04, 2026
Path traversal in Plandex 2.2.1's ApplyFiles function allows an attacker who can influence the AI model's output - through poisoned repository files or attacker-controlled context - to write files to arbitrary locations outside the intended project directory. Targets such as shell initialization files (~/.bashrc, ~/.zshrc) and cron entries can be silently overwritten, resulting in persistent code execution under the developer's local account. No CISA KEV entry or confirmed public exploit exists at time of analysis, but the attack surface (indirect prompt injection combined with insecure file-write) is increasingly well-understood in the AI tooling threat landscape.
RemediationAI
No vendor-released patch with an exact fix version has been independently confirmed at time of analysis. Users should monitor the Plandex GitHub repository (https://github.com/plandex-ai/plandex) and issue #352 for patch availability. As a compensating control, avoid running Plandex's apply workflow against untrusted or externally-sourced repositories until a validated fix is released. Developers should manually inspect all AI-proposed file paths before confirming application, specifically checking that no resolved path escapes the project root. The most effective interim mitigation is running Plandex inside a container or restricted sandbox (e.g., a Docker container with only the project directory bind-mounted), which prevents any write from reaching the host filesystem; this adds workflow overhead but eliminates the traversal risk entirely. Restricting outbound model context to read-only files and avoiding ingestion of content from untrusted contributors also reduces the indirect prompt injection surface.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Plandex (CPE cpe:2.3:a:plandex-ai:plandex:*:*:*:*:*:*:*:*) is a terminal-based AI coding assistant that proposes and applies file modifications to a local working tree. The ApplyFiles function, implemented in app/cli/lib/apply.go, is responsible for materializing AI-suggested file writes to disk. The root cause is CWE-22 (Path Traversal): the function does not canonicalize or validate the resolved write path against the project root boundary before performing the disk operation. Because Plandex feeds repository files as context to the underlying language model, an attacker who can embed crafted content in those files can steer the model toward generating file-creation proposals whose paths traverse outside the project directory - for example, suggesting '../../.bashrc' as a target. This is a form of indirect prompt injection: the attacker does not directly interact with the model but rather poisons the data the model ingests as context.
Know when Plandex gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Local vector; high complexity because attacker must probabilistically steer model output; scope changed since writes escape project sandbox to host filesystem.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
Plandex 2.2.1 contains a path traversal vulnerability in the ApplyFiles function that allows attackers to write files outside the project directory. Attackers can influence model output through poisoned repository files or attacker-controlled context to write to arbitrary locations like shell rc or cron files, achieving code execution.
Executive ViewAI
Plandex 2.2.1 contains a path traversal vulnerability in ApplyFiles that allows arbitrary file writes to developer workstations when the AI model's output is influenced through repository poisoning or injected context. An attacker exploiting this could achieve persistent code execution under developer credentials, potentially accessing and modifying proprietary source code.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable ApplyFiles or restrict to transient sandbox environments only; (2) Require explicit human approval with manual diff review before allowing any file-write operations; (3) Configure strict filesystem permissions limiting tool write access to designated project directories; (4) Enable comprehensive audit logging of user-home directory and cron modifications; (5) Restrict source code repository access to verified internal sources and monitor for suspicious changes; (6) Suspend Plandex deployments in critical development contexts until a patch is publicly available.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
EUVD-2026-71139
GHSA-8xmq-vqjx-27gw
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB