Skip to content

Instantly share code, notes, and snippets.

@Ro1ME
Last active September 26, 2026 04:39
Show Gist options
  • Select an option

  • Save Ro1ME/f667dcf8c3f4852900fa7811944f0f3f to your computer and use it in GitHub Desktop.

Select an option

Save Ro1ME/f667dcf8c3f4852900fa7811944f0f3f to your computer and use it in GitHub Desktop.
CVE-2026-51875 - Directory Traversal in Devika (feature.py:Feature.save_code_to_project)

CVE-2026-51875

Type: Directory Traversal Product: Devika Affected versions: v1.0 Affected component: src/agents/feature/feature.py:Feature.save_code_to_project Suggested CWE: CWE-22 (Directory Traversal) Reference: stitionai/devika#707

Description

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.

Reproduction Notes (condensed, sanitized)

Condensed from the authorized local validation used for the original report; local filesystem paths are replaced with <local-path>.

EXPECTED RESULT:

  • File created outside intended project workspace boundary
  • Path traversal with ../../ segments succeeds without validation
  • Disguised relative path (notes/../../) bypasses LLM safety checks ROOT CAUSE:
  • Source: src/agents/feature/feature.py:64 (Feature.save_code_to_project) - Accepts LLM-generated path without validation
  • No normalization or boundary checks after path join SECURITY IMPACT:
  • Directory traversal allows writing outside project workspace
  • Attacker can manipulate LLM to generate malicious paths via feature requests
  • Potential for arbitrary file write on filesystem REVIEWER NOTE: …

Discoverer

Ro1ME

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment