Ameeba Exploit Tracker

Tracking CVEs, exploits, and zero-days for defensive cybersecurity research.

Ameeba Blog Search
TRENDING · 1 WEEK
Attack Vector
Vendor
Severity

CVE-2025-58374: Arbitrary Code Execution Vulnerability in Roo Code AI Coding Agent

Ameeba Chat Store screens
Download Ameeba Chat

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

Ameeba Chat Icon 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.

Want to discuss this further? Join the Ameeba Cybersecurity Group Chat.

Disclaimer:

The information and code presented in this article are provided for educational and defensive cybersecurity purposes only. Any conceptual or pseudocode examples are simplified representations intended to raise awareness and promote secure development and system configuration practices.

Do not use this information to attempt unauthorized access or exploit vulnerabilities on systems that you do not own or have explicit permission to test.

Ameeba and its authors do not endorse or condone malicious behavior and are not responsible for misuse of the content. Always follow ethical hacking guidelines, responsible disclosure practices, and local laws.
Ameeba Chat