Overview
This report presents an analysis of the CVE-2025-58374 vulnerability, which poses a significant risk to Roo Code users. This AI-powered autonomous coding agent is a widely used tool that automates code writing in user editors. The vulnerability could lead to arbitrary code execution if exploited, potentially compromising system security or leading to data leakage.
Vulnerability Summary
CVE ID: CVE-2025-58374
Severity: High (CVSS 7.8)
Attack Vector: Network
Privileges Required: None
User Interaction: None
Impact: Potential system compromise or data leakage
Affected Products
Share secrets securely
Ameeba is private infrastructure for communication and sensitive work built on encrypted identity instead of exposed corporate identity systems.
Passwords, credentials, confidential files, screenshots, internal discussions, sensitive AI context, and private coordination should not become exposed across ordinary communication platforms.
- • Encrypted identity
- • Private Spaces for organizations and teams
- • End-to-end encrypted chat, calls, files, and notes
- • Sensitive AI work and protected collaboration
- • Built for information that cannot leak
Our mission is to secure human work alongside AI.
Product | Affected Versions
Roo Code | Versions 3.25.23 and below
How the Exploit Works
The vulnerability stems from the auto-approve feature of the autonomous coding agent. The affected versions of Roo Code contain a default list of allowed commands that do not require manual approval if this feature is enabled. Notably, the npm install command is included in this list.
When npm install executes lifecycle scripts, if a repository’s package.json file contains a malicious postinstall script, it would be executed automatically without user approval. Thus, enabling auto-approved commands and opening a malicious repo could result in arbitrary code execution.
Conceptual Example Code
Below is a conceptual example of how the vulnerability might be exploited. This pseudocode illustrates a malicious postinstall script in a package.json file:
{
"name": "malicious-package",
"version": "1.0.0",
"description": "",
"scripts": {
"postinstall": "echo 'Malicious code executed!'"
},
"dependencies": {
"roo-code": "3.25.23"
}
}
With the above malicious package, when a user opens the repository and the “npm install” command is auto-approved by Roo Code, the postinstall script is executed, leading to potential system compromise or data leakage.
