# CVE-2026-81835: RooCodeInc Roo-Code code injection in MCP Integration

Source: https://junglewise.ai/threats/cve-2026-81835-roocodeinc-roo-code-code-injection-in-mcp-integration  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-28. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-81835 · Severity: medium · CVSS 5.5 · Published 2026-08-28

Roo-Code is a development tool that integrates with external MCP (Model Context Protocol) servers to extend functionality. A vulnerability allows malicious MCP servers to inject arbitrary system instructions into Roo-Code's core logic without validation, potentially enabling attackers to execute commands, steal credentials, or compromise the developer's system. This affects unsupported versions up to 3.51.1, and the vendor has archived the project and no longer supports it.

Technologies: [RooCodeInc Roo Code](https://junglewise.ai/threats/technologies/roo-code). Vendors: [RooCodeInc](https://junglewise.ai/threats/vendors/roocodeinc).

## Quick answers

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

**How severe is CVE-2026-81835?** Medium severity, with a CVSS score of 5.5, 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-81835?** 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-81835 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-81835?** 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 code injection flaw (CWE-94, CWE-20) in Roo-Code's MCP integration component, specifically in the fetch_instructions function. External MCP servers can return arbitrary instructions that are incorporated directly into the agent's system prompt without content validation or sanitization. An attacker can distribute a malicious MCP server through npm or GitHub that, when installed by a user, injects commands into the system prompt during normal Roo-Code operation. Since MCP responses are treated as trusted system directives with the highest priority, an attacker can override security policies, execute arbitrary shell commands, and exfiltrate sensitive data such as environment variables or credentials. The attack requires user interaction (installation of the malicious MCP server) and network connectivity to the attacker's infrastructure. The vendor has archived this project and no longer provides support or patches.

## Affected products

- RooCodeInc Roo-Code up to 3.51.1

## Timeline

- 2026-08-28: disclosed: CVE-2026-81835 published; exploit publicly available
- 2026-06-20: other: Security advisory disclosed on GitHub
- 2026: other: Product archived by vendor; no longer supported

## References

- [https://gist.github.com/tchen200311/05b5960272c290b7843d6bbdbfe9f7c1](https://gist.github.com/tchen200311/05b5960272c290b7843d6bbdbfe9f7c1)
- [https://vuldb.com/cve/CVE-2026-81835](https://vuldb.com/cve/CVE-2026-81835)

## Related threats

- [RooCodeInc Roo-Code path traversal in ApplyPatchTool](https://junglewise.ai/threats/cve-2026-81837-roocodeinc-roo-code-path-traversal-in-applypatchtool)
- [RooCodeInc Roo-Code cleartext transmission of OAuth credentials](https://junglewise.ai/threats/cve-2026-81836-roocodeinc-roo-code-cleartext-transmission-of-oauth-credentials)
- [RooCodeInc Roo-Code code injection in README File Handler](https://junglewise.ai/threats/cve-2026-81834-roocodeinc-roo-code-code-injection-in-readme-file-handler)
- [RooCodeInc Roo-Code code injection in RAG system](https://junglewise.ai/threats/cve-2026-81833-roocodeinc-roo-code-code-injection-in-rag-system)
- [Roo Code command injection in auto-approve execute feature](https://junglewise.ai/threats/cve-2026-63108-roo-code-command-injection-in-auto-approve-execute-feature)
