Skip to content

Missing Line Break Validation in Command Execution Tool

High
mrubens published GHSA-p278-52x9-cffx Jul 23, 2025

Package

Roo Code

Affected versions

<3.23.19

Patched versions

3.23.19

Description

Summary
RooCode does not validate line breaks (\n) in command input, allowing potential bypass of the allow-list mechanism.

Details
RooCode 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.

For example, if only tsc is allow-listed, the following command:

tsc
python3 ./ex.py

would still result in the execution of python3, even though it is not on the allow list. This bypass undermines the integrity of the allow-list policy and allows unintended command execution.

PoC

tsc
python3 ./ex.py

Impact
This vulnerability allows a user to execute disallowed commands by inserting them after a line break in a multi-line input, effectively bypassing command restrictions.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVE ID

CVE-2025-54377

Weaknesses

Improper Neutralization of Special Elements used in a Command ('Command Injection')

The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. Learn more on MITRE.

Credits