CVE-2026-31854 Cursor Affected by Arbitrary Code Execution via Prompt Injection and Whitelist Bypass
- Exploited in the wild
- Not known
- Fix
- None listed
What is CVE-2026-31854?
CVE-2026-31854 is a high-severity vulnerability in cursor, published on 11 Mar 2026.
Official description
Cursor is a code editor built for programming with AI. Prior to 2.0 ,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. This vulnerability is fixed in 2.0.
Weakness: CWE-78
Which versions are affected by CVE-2026-31854?
It affects 1 product.
Products include Anysphere Cursor.
How do I fix CVE-2026-31854?
No fix has been published for CVE-2026-31854 yet. Limit exposure of the affected software until one is available.
Is CVE-2026-31854 being exploited?
There is no known exploitation of CVE-2026-31854 in the wild and no public exploit code.
Other vulnerabilities in cursor
- CVE-2026-50548 Cursor Desktop sandbox escape via agent-controlled working directory
- CVE-2026-50549 Cursor Desktop sandbox escape via symlink and failed path canonicalization
- CVE-2025-64106 Cursor: Speedbump Modal Bypass in MCP Server Deep-Link
- CVE-2025-64107 Cursor is Vulnerable to Path Manipulation Using Backslashes on Windows
- CVE-2025-64108 Cursor's Sensitive File Modification can Lead to NTFS Path Quirks