CVE-2025-53098: Roo Code Vulnerable to Potential Remote Code Execution via Model Context Protocol
Roo Code is an AI-powered autonomous coding agent. The project-specific MCP configuration for the Roo Code agent is stored in the .roo/mcp.json file within the VS Code workspace. Because the MCP configuration format allows for execution of arbitrary commands, prior to version 3.20.3, it would have been possible for an attacker with access to craft a prompt to ask the agent to write a malicious command to the MCP configuration file. If the user had opted-in to auto-approving file writes within the project, this would have led to arbitrary command execution. This issue is of moderate severity, since it requires the attacker to already be able to submit prompts to the agent (for instance through a prompt injection attack), for the user to have MCP enabled (on by default), and for the user to have enabled auto-approved file writes (off by default). Version 3.20.3 fixes the issue by adding an additional layer of opt-in configuration for auto-approving writing to Roo's configuration files, including all files within the .roo/ folder.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2025-53098?
CVE-2025-53098 is rated as high severity due to the potential for remote code execution via arbitrary command execution in configuration files.
How do I fix CVE-2025-53098?
To resolve CVE-2025-53098, update your Roo Code application to version 3.20.4 or later, where the vulnerability has been patched.
What platforms are affected by CVE-2025-53098?
CVE-2025-53098 affects all versions of Roo Code prior to 3.20.4, specifically when using the MCP configuration files.
What is the nature of the vulnerability in CVE-2025-53098?
CVE-2025-53098 allows an attacker to execute arbitrary commands through a misconfiguration in the MCP settings of the Roo Code agent.
Can I use Roo Code safely if I do not update for CVE-2025-53098?
Using Roo Code without the update for CVE-2025-53098 poses a significant security risk, and it is strongly recommended to update.