CVE-2025-58374: Roo Code: Auto-approve allows npm install execution of malicious postinstall scripts
Roo Code is an AI-powered autonomous coding agent that lives in users' editors. Versions 3.25.23 and below contain a default list of allowed commands that do not need manual approval if auto-approve is enabled, and npm install is included in that list. Because 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. This means that enabling auto-approved commands and opening a malicious repo could result in arbitrary code execution. This is fixed in version 3.26.0.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-58374?
CVE-2025-58374 is classified as a high severity vulnerability due to its potential to execute commands without manual approval.
Who is affected by CVE-2025-58374?
CVE-2025-58374 affects all versions of Roo Code 3.25.23 and below that have auto-approval enabled.
How do I fix CVE-2025-58374?
To fix CVE-2025-58374, upgrade to Roo Code version 3.26.0 or later where the issue has been addressed.
What are the implications of CVE-2025-58374?
The implications of CVE-2025-58374 include unauthorized command execution which could lead to security breaches.
Is CVE-2025-58374 related to npm install?
Yes, CVE-2025-58374 includes npm install in the list of commands that can be executed without manual approval when auto-approve is enabled.