Incident report

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 record

Reported
Severity
Critical
Vector
Indirect Prompt Injection
Affected system type
Autonomous IDE Coding Agent Extensions
Reference
CVE-2025-58372
Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2025-58372

Inspect in Interactive Incidents Hub

Defensive lesson

Treat all IDE workspace descriptors, dotfiles, and task manifests (.vscode, .code-workspace, devcontainer.json) as privileged code requiring human approval.

Referenced techniques