Arbitrary Code Execution via Prompt Injection and Whitelist Bypass
HighCVE-2026-31854 · Published Mar 9, 2026
### Summary Cursor is able to access arbitrary websites. If a visited website contains maliciously crafted instructions, the model may attempt to follow them in order to “assist” the user. When combined with a bypass of the command whitelist mechanism, such indirect prompt injections could result in commands being executed automatically, without the user’s explicit intent, thereby posing a significant security risk. ### Impact This vulnerability allows an attacker to achieve arbitrary command execution on a user’s system via the Cursor Agent, even when Auto‑Run Mode is set to “Use AllowList.” By serving malicious prompt‑injection content and bypassing the whitelist check, an attacker can execute commands without user consent, leading to potential system compromise. Any user who interacts with untrusted websites through the Cursor Agent is at risk.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| Cursor Product | < 2.0 | 2.0 |
Details and references
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-78
More Cursor advisories
All Cursor| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Jul 6 | Cloud Agent Browser Sandbox Escape | High7.7 | Fixedon03/31/2026 |
| Jun 5 | Cursor Desktop sandbox escape via agent-controlled working directory | Critical | 3.0 |
| Jun 5 | Cursor Desktop sandbox escape via symlink and failed path canonicalization | Critical | 3.0 |
| May 21 | Cursor Desktop sandbox escape via Claude hook configuration | High8.5 | 3.0.0 |
| Feb 13 | Sandbox escape via Git hooks | High8.0 | 2.5 |
| Jan 14 | Terminal Tool Allowlist Bypass via Environment Variables | High | 2.3 |