Ameeba Security Research

Defensive CVE and exploit intelligence

Ameeba Blog Search
TRENDING · 1 WEEK
Attack Vector
Vendor
Severity

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

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 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.

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