CVE-2026-51875: Devika path traversal in save_code_to_project function

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

Devika is an AI-powered code generation tool that accepts user requests to create and modify project files. A path traversal vulnerability in the save_code_to_project function allows attackers to write files outside the project workspace by injecting relative path sequences (like ../../), potentially enabling arbitrary file writes, code execution, or data theft on the server.

Technologies: Stitionai Devika. Vendors: Stitionai.

Quick answers

Is CVE-2026-51875 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-51875 being exploited in the wild.
How severe is CVE-2026-51875?
Informational severity, published 1 October 2026.
Which products and versions are affected?
Stitionai Devika v1.0.
Is there a fix for CVE-2026-51875?
No fixed version is recorded yet. Normalize all file paths using os.path.normpath() or pathlib.Path.resolve() and verify that the resolved path remains within the project workspace before writing; reject or sanitize paths containing .. sequences or absolute paths. 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-51875 attacked?
It is attacked over the network.
Am I affected by CVE-2026-51875?
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.

How to fix

Normalize all file paths using os.path.normpath() or pathlib.Path.resolve() and verify that the resolved path remains within the project workspace before writing; reject or sanitize paths containing .. sequences or absolute paths.

Technical details

The vulnerability exists in src/agents/feature/feature.py where the save_code_to_project function constructs file paths using os.path.join() without validating or normalizing user-controlled or LLM-generated file names. An attacker can embed directory traversal sequences (../) in feature requests to escape the intended project workspace and write to arbitrary filesystem locations. The attack is triggered via Socket.IO user-message events with action=feature, allowing remote exploitation without authentication barriers.

Affected products

  • stitionai Devika v1.0

Timeline

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

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.