CVE-2025-58374 Roo Code: Auto-approve allows npm install execution of malicious postinstall scripts

High 7.8 Published Updated

Attackers can execute arbitrary code via malicious npm postinstall scripts when auto-approve is enabled in Roo Code.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2025-58374?

CVE-2025-58374 is a high-severity command injection vulnerability in RooCodeInc Roo-Code, published on 6 Sep 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-78

Which versions are affected by CVE-2025-58374?

It affects 1 product.

Products include Roocode Roo Code.

How do I fix CVE-2025-58374?

No fix has been published for CVE-2025-58374 yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2025-58374 being exploited?

There is no known exploitation of CVE-2025-58374 in the wild and no public exploit code.

Sources

Also known as GHSA-c292-qxq4-4p2v.

Is CVE-2025-58374 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free