Cursor
CVE-2026-31854
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious website with prompt injection instructions
-
DeliveryUser visits website in Cursor editor
-
ExploitEditor AI model processes injected commands
-
ExecutionWhitelist bypass executed
-
ImpactArbitrary OS commands run
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Cursor versions prior to 2.0 with AI model integration enabled. User must visit attacker-controlled website containing malicious instructions. Command whitelist bypass mechanism must be present in targeted version. |
| Exploit ScenarioDerived | An attacker could exploit this vulnerability to commands being executed automatically, without the user’s explicit intent, there. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 12, 2026
Cursor is a code editor built for programming with AI. versions up to 2.0 is affected by os command injection.
RemediationAI
Fixed in version 2.0..
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
This vulnerability (CWE-78: OS Command Injection) affects Cursor is a code editor built for programming with AI.. 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.
Know when Cursor gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
DescriptionGitHub Advisory
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.
Executive ViewAI
Organizations using Cursor face significant risk from CVE-2026-31854, a OS command injection vulnerability rated CVSS 8.8. Successful exploitation could allow attackers to execute arbitrary code or commands on affected systems, potentially leading to full system compromise. Organizations should apply vendor updates when available and consider compensating controls in the interim.
Apply vendor patch. If immediate patching is not feasible: (1) Deploy WAF rules to block injection patterns; (2) Restrict network access to affected components; (3) Enable enhanced logging for suspicious activity.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Affected Products (CPE)GitHub Advisory
Arbitrary code execution in Cursor for Windows 3.2.16 lets remote attackers run code on a developer's machine by plantin
Remote code execution in Cursor IDE 1.6.23 and below can be triggered by prompt injection that abuses case-insensitive p
Cursor AI code editor before 2.3 allows prompt injection to bypass the Agent's Allowlist mode. Shell built-ins can execu
Sandbox escape leading to non-sandboxed remote code execution in Cursor (the AI code editor) prior to version 3.0, where
Sandbox escape leading to non-sandboxed remote code execution affects the Cursor AI code editor prior to version 3.0, wh
Cursor is a code editor built for programming with AI. In versions 1.7 and below, automatic loading of project-specific
Remote code execution in Cursor CLI Agent 1.7 and earlier can be triggered by unauthenticated attackers through prompt i
Cursor is a code editor built for programming with AI. Rated high severity (CVSS 8.8), this vulnerability is remotely ex
Cursor is a code editor built for programming with AI. In versions 1.7 and below, when MCP uses OAuth authentication wit
Cursor is a code editor built for programming with AI. Rated high severity (CVSS 8.8), this vulnerability is remotely ex
Cursor is a code editor built for programming with AI. Rated high severity (CVSS 8.8), this vulnerability is remotely ex
Cursor is a code editor built for programming with AI. Rated high severity (CVSS 8.7), this vulnerability is remotely ex
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB