CVE-2026-51873 in Devikainfo

Summary

by MITRE • 10/01/2026

Devika v1.0 is vulnerable to Directory Traversal in the Coder.save_code_to_project function, which allows attackers to write files outside the intended project workspace.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 10/01/2026

The vulnerability identified in Devika version 1.0 represents a critical security flaw within its code management subsystem, specifically located in the coder module's save_code_to_project function. This issue is classified as a Directory Traversal or Path Traversal vulnerability, which falls under CWE-22: Improper Limitation of a Filename to Allowed Directory. The core technical failure stems from insufficient validation and sanitization of user-supplied input that dictates the file path where code snippets are stored. When an attacker provides a maliciously crafted filename containing directory traversal sequences, such as dot-dot-slash (../) or their URL-encoded equivalents, the application fails to properly resolve these paths against the intended project workspace root. Instead of rejecting the request or normalizing the path to stay within bounds, the function interprets the relative navigation commands literally and writes the file content to arbitrary locations on the underlying operating system's filesystem.

From an operational perspective, this vulnerability allows for significant unauthorized access and potential remote code execution depending on the context in which Devika is deployed. By writing files outside the designated project directory, an attacker can overwrite critical configuration files, inject malicious scripts into web-accessible directories if applicable, or place executable payloads in system paths where they might be triggered by other processes. This lack of boundary enforcement effectively bypasses the application's logical security controls designed to isolate user projects from one another and from sensitive system resources. The impact is severe because it compromises not only data integrity but also confidentiality and availability, as attackers could delete essential files or corrupt project states through unauthorized file manipulation.

This type of vulnerability aligns with several techniques in the MITRE ATT&CK framework, particularly those related to Command and Scripting Interpreter abuse or File Manipulation for persistence and impact. Attackers can leverage this flaw to establish a foothold within the system environment if they can predict writable locations that are executed by higher-privilege services. The absence of strict path canonicalization before file operations is a common oversight in early-stage software development, where rapid iteration often outpaces rigorous security testing. It highlights the necessity of implementing robust input validation strategies at all points where external data influences system resource access paths.

To mitigate this vulnerability, developers must implement strict allow-listing for directory structures and enforce path normalization before any file I/O operations occur. The save_code_to_project function should resolve the provided filename to an absolute path and verify that the resulting path begins with the expected project root directory prefix. If the resolved path falls outside these boundaries, the operation must be denied immediately. Additionally, employing chroot jails or containerization technologies can provide a secondary layer of defense by restricting the application's view of the filesystem, thereby limiting the blast radius even if traversal attempts succeed. Regular security audits and static code analysis tools configured to detect CWE-22 patterns are essential for identifying such flaws early in the development lifecycle.

Responsible

MITRE

Reservation

06/08/2026

Disclosure

10/01/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!