Cursor
CVE-2026-22708
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInject malicious prompt into Cursor Agent
-
DeliveryTrigger shell built-in execution
-
ExploitBypass allowlist restrictions
-
ExecutionModify environment variables
-
ImpactPoison trusted command execution
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A02:2025 - Security Misconfiguration
ASVS 5.0
V13 - Configuration Configuration hardening
|
| Exploitation Conditions | Cursor Agent must be running in Auto-Run Mode with Allowlist mode enabled. Attacker requires ability to provide input prompts (direct or indirect injection) to the Agent. No authentication required for prompt injection. |
| Impact | CVSS 9.8 (Critical). No auth (prompt injection via code or chat). AI code editors have broad filesystem and command access. EPSS 0.06%. |
| Exploit ScenarioDerived | A malicious codebase contains a comment with instructions that trick Cursor's AI agent into setting PATH to include an attacker-controlled directory, then running what appears to be a safe command that actually executes the attacker's binary. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 12, 2026
Cursor AI code editor before 2.3 allows prompt injection to bypass the Agent's Allowlist mode. Shell built-ins can execute without appearing in the allowlist, enabling environment poisoning and arbitrary command execution.
Earlier versions of this analysis (1)
Cursor AI editor allows shell built-in execution bypassing the Agent Allowlist, enabling environment poisoning via prompt injection.
RemediationAI
Update to Cursor 2.3 or later. Review AI agent execution logs for suspicious shell built-in usage.
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
The Agent's Auto-Run Mode with Allowlist only checks explicit commands, not shell built-ins like export, alias, and set (CWE-15). Through prompt injection, an attacker can manipulate environment variables, redefine commands via aliases, and poison the shell environment.
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:N/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.3, hen the Cursor Agent is running in Auto-Run Mode with Allowlist mode enabled, certain shell built-ins can still be executed without appearing in the allowlist and without requiring user approval. This allows an attacker via indirect or direct prompt injection to poison the shell environment by setting, modifying, or removing environment variables that influence trusted commands. This vulnerability is fixed in 2.3.
Executive ViewAI
Organizations using Cursor face critical risk from CVE-2026-22708 rated CVSS 9.8. Successful exploitation could critically impact the confidentiality, integrity, and availability of affected systems. Organizations should apply vendor updates immediately when available and implement compensating controls in the interim.
Apply vendor patch. If immediate patching is not feasible: (1) Implement network-level access controls to limit exposure; (2) Enable enhanced monitoring and alerting; (3) Apply principle of least privilege.
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
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
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
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. versions up to 2.0 is affected by os command injection.
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
Exploit-DB