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
Escape the Surveillance Era
Most apps won’t tell you the truth.
They’re part of the problem.
Phone numbers. Emails. Profiles. Logs.
It’s all fuel for surveillance.
Ameeba Chat gives you a way out.
- • No phone number
- • No email
- • No personal info
- • Anonymous aliases
- • End-to-end encrypted
Chat without a trace.
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.

