CVE-2026-81837: RooCodeInc Roo-Code path traversal in ApplyPatchTool

CVE-2026-81837 · Severity: medium · CVSS 6.3 · Published 2026-08-28

Roo-Code is a code editing and automation tool that processes patch files to apply code changes. A path traversal vulnerability in the ApplyPatchTool component allows an attacker to craft malicious patch files that, when applied by a victim, modify files outside the intended workspace—potentially compromising SSH keys, shell configuration, or Git credentials for persistent system access.

Technologies: RooCodeInc Roo Code. Vendors: RooCodeInc.

Quick answers

Is CVE-2026-81837 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-81837 being exploited in the wild.
How severe is CVE-2026-81837?
Medium severity, with a CVSS score of 6.3, published 28 August 2026.
Which products and versions are affected?
RooCodeInc Roo Code up to 3.51.1.
Is there a fix for CVE-2026-81837?
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-81837 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-81837?
Check whether you run RooCodeInc Roo Code 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 vulnerability is a path traversal (CWE-22) in src/core/tools/ApplyPatchTool.ts, where the component resolves patch file paths using path.resolve(task.cwd, relPath) without validating that the resulting path remains within the workspace boundary. An attacker can distribute a malicious patch file containing path traversal sequences (e.g., ../../.ssh/authorized_keys) via email, GitHub, Slack, or pull requests. When a victim applies the patch through the Roo-Code agent, the tool processes the path without sanitization and modifies files outside the workspace (e.g., SSH keys, .bashrc, .gitconfig). The attack requires victim interaction (applying the patch) but is highly effective for social engineering. The product is no longer maintained; the vendor has archived the repository and does not support Roo-Code.

Affected products

  • RooCodeInc Roo-Code up to 3.51.1

Timeline

  • 2026-08-28: disclosed
  • 2026-06-20: exploited: Exploit published (POC available via GitHub Gist)

References

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