// Security by tool
Security for Windsurf-generated code
Quick answer
Just like Cursor, Windsurf security has two axes: the agent and the code. On the agent, CVE-2025-62353 (path traversal, CVSS 9.8) allowed exfiltrating secrets via prompt injection hidden in a project file (a README.md, for example), even with auto-execution disabled. Worse: an injection could modify the local MCP config and register a malicious MCP server, turning into command execution with no interaction. Add to that 94+ flaws inherited from the legacy Chromium (CVE-2025-7656) that hit Cursor and Windsurf together, exposing 1.8 million devs.
On the code, the same as Cursor applies: Windsurf accelerates, but repeats insecure patterns (auth in the front-end, IDOR, secrets). So the review is double: how you configure Windsurf (what the agent reads and executes) and what it wrote in the flows that touch access, money and data.
Where the risk shows up
One axis is the dev machine (the agent); the other is the app in production (the generated code).
| Axis | CVE / pattern | Defense |
|---|---|---|
| Prompt injection in a file | CVE-2025-62353 (path traversal 9.8) | Do not treat project content as an order |
| Malicious MCP registration | Injection modifies config and runs a command | Allowlist MCP, review local config |
| Legacy Chromium flaws | CVE-2025-7656 (94+ flaws, Cursor+Windsurf) | Keep updated |
| Insecure generated code | Auth in the front-end, IDOR, secrets | Human review of the sensitive flows |
How RET reviews Windsurf code
RET tests the generated code on the endpoints that touch data: logged in as user A, can I reach user B’s resource? It checks server-side authorization, input validation and secrets in the right place. And it advises on Windsurf config (agent permissions, MCP, auto-execution) because of the path traversal and MCP CVEs.
The Promptbook has prompts for you to review what the agent generated and flag where it had too much permission. When access is critical, Risk Review does the human read.
- Ownership tested on the endpoints that return data.
- Agent config: MCP on an allowlist, auto-execution limited.
- Windsurf updated because of the Chromium and path traversal flaws.
You may already be exposed if
Signals that call for a review of a Windsurf-built project.
- You open a repo or dependency from an untrusted source in Windsurf.
- You let the agent register MCP and run commands without review.
- You accept code in an auth/billing flow without checking the security.
- You have not updated Windsurf in a while (Chromium flaws pile up).
Want to know whether this happens in your system?
Manual pentest for web applications, APIs and apps, from R$9,500, with the Sprint run within 7 business days. We refund 50% if we find no flaw.
Frequently asked questions
Does CVE-2025-62353 affect me even with auto-execution off?
It did: the critical point of that flaw was exfiltrating secrets via prompt injection EVEN with auto-execution disabled, via path traversal. Update Windsurf and do not treat a project file from an external source as trusted content.
Should I worry about Windsurf’s MCP?
Yes. There was an injection able to modify the local MCP config and register a malicious server, turning into command execution. Use an MCP allowlist, review the config and limit what the agent runs on its own.
Is Windsurf code secure?
It accelerates, but repeats insecure patterns like any assistant (auth in the front-end, IDOR, secrets). What it generates in a sensitive flow needs review; the Promptbook guides that check.
Who runs the review at RET?
Gabriel Lima Ferreira, founder and lead pentester, with an authorized scope and reproducible evidence.