Documented Incident · INC-2025-58372 · Critical severity
Roo Code .code-workspace File Write Bypass Planting Persistent IDE Tasks
CVE-2025-58372 (published September 5, 2025) disclosed a critical code injection vulnerability in Roo Code versions `<= 3.25.23`. While the extension guarded writes into `.vscode/` directories, it failed to apply equivalent write protections to VS Code `.code-workspace` JSON files, which can embed auto-running terminal tasks. When auto-approval for file writes was enabled, an indirect prompt injection could plant malicious workspace tasks that executed arbitrary shell commands upon workspace reload. Roo Code v3.26.0 added `.code-workspace` to its protected write-approval list.
Incident dossier metadata
- Case ID
INC-2025-58372- Classification
- Incident
- Date
- Severity
- Critical
- Sector
- Software Development & AI Tooling
- Attack vector
- Indirect Prompt Injection
- System type
- Autonomous IDE Coding Agent Extensions
- CVE / reference
CVE-2025-58372- Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2025-58372
Defensive takeaway
Treat all IDE workspace descriptors, dotfiles, and task manifests (.vscode, .code-workspace, devcontainer.json) as privileged code requiring human approval.
Mapped AI security techniques
- Command and Scripting Interpreter AML.T0050
- LLM Prompt Injection: Indirect AML.T0051.001
- Modify AI Agent Configuration AML.T0081
- Machine Compromise: Local AI Agent AML.T0112.000
- Event Triggered Execution AML.T0142
Mapped defensive controls
Source citation records
- NVD Record CVE-2025-58372: Roo Code .code-workspace Code Injection · NIST National Vulnerability Database (NVD) ·