CVE-2025-54377 in Roo-Codeinfo

Summary

by MITRE • 07/24/2025

Roo Code is an AI-powered autonomous coding agent that lives in users' editors. In versions 3.23.18 and below, RooCode does not validate line breaks (\n) in its command input, allowing potential bypass of the allow-list mechanism. The project appears to lack parsing or validation logic to prevent multi-line command injection. When commands are evaluated for execution, only the first line or token may be considered, enabling attackers to smuggle additional commands in subsequent lines. This is fixed in version 3.23.19.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 09/11/2025

The vulnerability identified as CVE-2025-54377 affects Roo Code, an AI-powered autonomous coding agent integrated into developer environments. This tool operates as an intelligent assistant that executes commands within user editors, making it a critical component in the software development lifecycle. The flaw exists in versions 3.23.18 and earlier, where the system fails to properly validate line break characters in command inputs, creating a significant security risk that could be exploited by malicious actors. The vulnerability specifically targets the input validation mechanisms that are essential for maintaining security boundaries within the agent's execution environment.

The technical implementation of this vulnerability stems from inadequate input sanitization and parsing logic within Roo Code's command processing pipeline. When users provide commands to the AI agent, the system does not properly handle multi-line inputs containing line break characters, allowing attackers to craft malicious payloads that span multiple lines. This weakness creates a command injection vector where only the first line of a multi-line command is processed, while subsequent lines containing additional commands remain undetected and unvalidated. The allow-list mechanism that should prevent unauthorized command execution becomes ineffective when attackers can smuggle commands through the line break bypass, effectively circumventing the intended security controls.

The operational impact of this vulnerability is substantial, as it could enable attackers to execute arbitrary commands within the context of the user's development environment. This risk extends beyond simple command injection to potentially compromise the entire development workflow, allowing unauthorized access to code repositories, system resources, and sensitive data. The vulnerability particularly affects developers who rely on AI coding agents for automated tasks, as attackers could exploit this weakness to gain persistent access to development environments or escalate privileges within the system. The security implications are amplified by the fact that these agents often operate with elevated permissions to perform coding tasks, making them attractive targets for attackers seeking system compromise.

This vulnerability maps to CWE-77 and CWE-78 within the Common Weakness Enumeration framework, representing command injection and improper input validation respectively. The attack pattern aligns with techniques described in the MITRE ATT&CK framework under T1059.001 for command and scripting interpreter and T1068 for exploit for privilege escalation. Organizations should immediately update to version 3.23.19 or later, which implements proper line break validation and multi-line command parsing. Additional mitigations include implementing network-level restrictions on AI agent communications, conducting regular security audits of AI tool configurations, and establishing monitoring for unusual command execution patterns. The fix addresses the root cause by introducing comprehensive input validation that properly handles line break characters and ensures all command lines are validated against the allow-list mechanism before execution.

Responsible

GitHub M

Reservation

07/21/2025

Disclosure

07/24/2025

Moderation

accepted

CPE

ready

EPSS

0.01142

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!