CVE-2026-85690 in Plandex
Summary
by MITRE • 09/04/2026
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.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 09/04/2026
The security flaw identified in Plandex version 2.2.1 represents a critical path traversal vulnerability located within the ApplyFiles function of the application's core logic. This defect stems from insufficient validation and sanitization of user-supplied input when processing file paths intended for writing operations. Specifically, the system fails to properly canonicalize or restrict the destination directory structure before executing write commands. As a result, an attacker can manipulate the path parameters by utilizing relative navigation sequences such as dot-dot-slash patterns. This manipulation allows the application to resolve targets outside of its designated project root directory, effectively bypassing intended sandbox boundaries and granting write access to arbitrary locations on the underlying file system.
The operational impact of this vulnerability is severe due to the potential for remote code execution through indirect means. By exploiting the ability to write files in unrestricted directories, an attacker can target sensitive configuration files that are automatically executed by the operating system or shell environments upon login or scheduled intervals. Common targets include shell resource files such as .bashrc or .profile, which execute commands every time a user opens a terminal session. Alternatively, attackers may inject malicious entries into cron job configurations to achieve persistent execution at specific times. This technique allows for stealthy persistence and privilege escalation without requiring direct interaction with the application's command-line interface during each attack instance.
From an industry standards perspective, this vulnerability aligns closely with CWE-22, which defines Improper Limitation of a Pathname to a Restricted Directory. The exploitation method also maps directly to MITRE ATT&CK techniques related to Persistence and Execution. Specifically, the use of shell rc files corresponds to T1546.008 (Event Triggered Execution: Unix Shell Configuration Modification), while modifications to cron jobs fall under T1053.003 (Scheduled Task/Job: Cron). These mappings highlight how a simple file write flaw can be leveraged within broader attack chains to establish long-term access and control over the compromised system environment.
Mitigation strategies must focus on implementing strict input validation and enforcing secure coding practices for path handling. Developers should ensure that all file paths are resolved using absolute canonicalization before any filesystem operations are performed, ensuring they remain strictly within the allowed project directory boundaries. Additionally, employing allow-lists for permitted characters in filenames and restricting write permissions to specific subdirectories can significantly reduce the attack surface. It is also advisable to run application processes with minimal privileges, limiting the potential damage even if a path traversal occurs by preventing access to sensitive system configuration files located outside the user's home directory or standard writable areas.