# CVE-2026-51873: Devika directory traversal in Coder.save_code_to_project

Source: https://junglewise.ai/threats/cve-2026-51873-devika-v1-0-is-vulnerable-to-directory-traversal-in-the-coder  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-01. Updated: 2026-10-05  
License: CC BY 4.0 with a link back

CVE-2026-51873 · Severity: info · Published 2026-10-01

Devika is an AI-powered coding agent that automates software development tasks. A directory traversal vulnerability in its file-saving function allows attackers to write files anywhere on the server filesystem outside the intended project workspace, enabling arbitrary code execution, configuration manipulation, or data theft through malicious prompts.

Technologies: [Stitionai Devika](https://junglewise.ai/threats/technologies/devika). Vendors: [Stitionai](https://junglewise.ai/threats/vendors/stitionai).

## Quick answers

**Is CVE-2026-51873 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-51873 being exploited in the wild.

**How severe is CVE-2026-51873?** Informational severity, published 1 October 2026.

**Which products and versions are affected?** Stitionai Devika v1.0.

**Is there a fix for CVE-2026-51873?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-51873 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-51873?** Check whether you run Stitionai Devika at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The Coder.save_code_to_project function in src/agents/coder/coder.py accepts LLM-generated file paths without path normalization or boundary validation, then passes them directly to file write operations. An attacker can inject path traversal sequences (e.g., ../../) via Socket.IO messages to write files outside the project directory. The vulnerability is reachable through the Socket.IO user-message event and requires only the ability to communicate with the Devika server.

## Affected products

- stitionai Devika v1.0

## Timeline

- 2026-04-20: disclosed
- 2026-10-01: advisory

## References

- [https://gist.github.com/Ro1ME/946b670dfefd594a123ed4527de34088](https://gist.github.com/Ro1ME/946b670dfefd594a123ed4527de34088)
- [https://github.com/stitionai/devika/issues/707](https://github.com/stitionai/devika/issues/707)

## Related threats

- [Devika path traversal in save_code_to_project function](https://junglewise.ai/threats/cve-2026-51875-in-devika-v1-0-the-feature-agent-save-code-to-project-function)
- [Devika code injection in Runner.execute function](https://junglewise.ai/threats/cve-2026-51871-devika-v1-0-is-vulnerable-to-code-injection-in-the-runner-execute)
