CVE-2026-51875 in Devika
Summary
by MITRE • 10/02/2026
In Devika v1.0, the Feature Agent save_code_to_project function contains a path traversal vulnerability that allows attackers to write files outside the intended project workspace, potentially compromising the entire server.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 10/02/2026
The identified vulnerability in Devika version 1.0 represents a critical security flaw within the Feature Agent module, specifically located in the save_code_to_project function. This component is responsible for handling user inputs related to code generation and storage, acting as an intermediary between AI-driven development tasks and the underlying file system of the host server. The core technical issue stems from insufficient validation or sanitization of input parameters before they are processed into filesystem paths. When a malicious actor provides specially crafted input containing directory traversal sequences, such as dot-dot-slash combinations, the application fails to properly resolve these relative path references against the intended project workspace root. Instead of restricting file writes to the designated sandboxed environment, the function interprets the absolute or escaped paths literally, allowing data to be written to arbitrary locations on the server's filesystem.
This lack of strict boundary enforcement constitutes a classic Path Traversal vulnerability, which is formally categorized under CWE-22 in the Common Weakness Enumeration standards. The operational impact of this flaw extends far beyond simple unauthorized file creation within the project directory. Because the save_code_to_project function likely executes with elevated privileges necessary to write code files, an attacker can exploit this weakness to overwrite critical system configuration files, inject malicious scripts into web-accessible directories, or place backdoors in sensitive locations such as home directories of service accounts. This capability effectively allows for remote code execution if the written content is subsequently executed by another process or served via a web server, thereby compromising the integrity and availability of the entire host infrastructure rather than just the specific application instance.
From an offensive security perspective, this vulnerability aligns with techniques described in the MITRE ATT&CK framework, particularly those related to Command and Scripting Interpreter abuse or File Manipulation for persistence and privilege escalation. An adversary could leverage this path traversal to establish a foothold on the system by writing executable payloads that are triggered through other application features or scheduled tasks. The severity is further amplified by the context of AI-assisted development tools, where users may inadvertently provide inputs that trigger these flaws during normal operation if proper input filtering is not enforced at the API level.
Mitigation strategies must focus on implementing robust path canonicalization and strict allow-listing mechanisms. Developers should resolve all file paths to their absolute equivalents before performing any filesystem operations and verify that the resulting path remains strictly within the predefined project workspace root directory. Additionally, employing chroot jails or containerized environments with restricted volume mounts can provide a critical layer of defense by limiting the scope of accessible files regardless of application-level logic errors. Input validation should also be applied to reject any characters or sequences associated with directory traversal before they reach the file handling logic. Regular security audits and static code analysis focused on filesystem interactions are recommended to identify similar weaknesses in other parts of the Devika architecture, ensuring that future updates do not reintroduce these dangerous patterns.