CVE-2026-22708 in Anysphere Cursor
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 promp...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Anysphere | Cursor | < 2.3 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2026-22708 |
|---|---|
| BreachSpider ID | BS-2026-GLOBAL-069161-C |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Published | 2026-01-14 |
| Last modified | 2026-02-03 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-15: CWE-15
CWE-74: Injection
Parent class for all injection vulnerabilities where attacker-supplied data is interpreted as code or commands.
CWE-77: Command Injection
Attacker injects operating system commands through application inputs passed to a shell or system call.
CWE-78: OS Command Injection
Attacker injects OS commands through application inputs passed to system() or equivalent calls, leading to arbitrary command execution.
CWE-94: Code Injection
Attacker injects arbitrary code that is executed by the application process.
CWE-269: Improper Privilege Management
Software does not properly assign, modify, track, or check privileges, allowing unauthorized elevation of access.
Related attack patterns (CAPEC)
CAPEC-3 Using Leading 'Ghost' Character Sequences to Bypass Input Filters via CWE-74
CAPEC-7 Blind SQL Injection via CWE-74
CAPEC-8 Buffer Overflow in an API Call via CWE-74
CAPEC-9 Buffer Overflow in Local Command-Line Utilities via CWE-74
CAPEC-10 Buffer Overflow via Environment Variables via CWE-74
Show all 57
CAPEC-13 Subverting Environment Variable Values via CWE-15, CWE-74
CAPEC-14 Client-side Injection-induced Buffer Overflow via CWE-74
CAPEC-24 Filter Failure through Buffer Overflow via CWE-74
CAPEC-34 HTTP Response Splitting via CWE-74
CAPEC-35 Leverage Executable Code in Non-Executable Files via CWE-94
CAPEC-42 MIME Conversion via CWE-74
CAPEC-43 Exploiting Multiple Input Interpretation Layers via CWE-74, CWE-77, CWE-78
CAPEC-45 Buffer Overflow via Symbolic Links via CWE-74
CAPEC-46 Overflow Variables and Tags via CWE-74
CAPEC-47 Buffer Overflow via Parameter Expansion via CWE-74
CAPEC-51 Poison Web Service Registry via CWE-74
CAPEC-52 Embedding NULL Bytes via CWE-74
CAPEC-53 Postfix, Null Terminate, and Backslash via CWE-74
CAPEC-58 Restful Privilege Elevation via CWE-269
CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic via CWE-74
CAPEC-67 String Format Overflow in syslog() via CWE-74
CAPEC-71 Using Unicode Encoding to Bypass Validation Logic via CWE-74
CAPEC-72 URL Encoding via CWE-74
CAPEC-76 Manipulating Web Input to File System Calls via CWE-15, CWE-74, CWE-77
CAPEC-78 Using Escaped Slashes in Alternate Encoding via CWE-74
CAPEC-79 Using Slashes in Alternate Encoding via CWE-74
CAPEC-80 Using UTF-8 Encoding to Bypass Validation Logic via CWE-74
CAPEC-83 XPath Injection via CWE-74
CAPEC-84 XQuery Injection via CWE-74
CAPEC-101 Server Side Include (SSI) Injection via CWE-74
CAPEC-105 HTTP Request Splitting via CWE-74
CAPEC-108 Command Line Execution through SQL Injection via CWE-74, CWE-78
CAPEC-120 Double Encoding via CWE-74
CAPEC-146 XML Schema Poisoning via CWE-15
CAPEC-270 Modification of Registry Run Keys via CWE-15
CAPEC-273 HTTP Response Smuggling via CWE-74
CAPEC-579 Replace Winlogon Helper DLL via CWE-15
CAPEC-6 Argument Injection via CWE-74, CWE-78
CAPEC-15 Command Delimiters via CWE-77, CWE-78
CAPEC-40 Manipulating Writeable Terminal Devices via CWE-77
CAPEC-69 Target Programs with Elevated Privileges via CWE-15
CAPEC-75 Manipulating Writeable Configuration Files via CWE-77
CAPEC-77 Manipulating User-Controlled Variables via CWE-15, CWE-94
CAPEC-88 OS Command Injection via CWE-78
CAPEC-135 Format String Injection via CWE-74
CAPEC-136 LDAP Injection via CWE-77
CAPEC-183 IMAP/SMTP Command Injection via CWE-77
CAPEC-203 Manipulate Registry Information via CWE-15
CAPEC-250 XML Injection via CWE-74
CAPEC-267 Leverage Alternate Encoding via CWE-74
CAPEC-271 Schema Poisoning via CWE-15
CAPEC-28 Fuzzing via CWE-74
CAPEC-122 Privilege Abuse via CWE-269
CAPEC-176 Configuration/Environment Manipulation via CWE-15
CAPEC-233 Privilege Escalation via CWE-269
CAPEC-242 Code Injection via CWE-94
CAPEC-248 Command Injection via CWE-77
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
CVE-2026-22708 affects Cursor versions prior to 2.3, where the Cursor Agent in Auto-Run Mode with Allowlist mode enabled can execute certain shell built-ins without user approval, potentially allowing an attacker to poison the shell environment.
An attacker can exploit this vulnerability by injecting indirect or direct prompts that execute unauthorized shell built-ins, leading to the modification of the shell environment without user consent.
Questions
What is CVE-2026-22708?
CVE-2026-22708 affects Cursor versions prior to 2.3, where the Cursor Agent in Auto-Run Mode with Allowlist mode enabled can execute certain shell built-ins without user approval, potentially allowing an attacker to poison the shell environment.
What is the CVSS score for CVE-2026-22708?
CVE-2026-22708 has CVSS 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. EPSS: 0.6%.
Is CVE-2026-22708 actively exploited?
No confirmed active exploitation of CVE-2026-22708 as of 2026-05-30.
How do I remediate CVE-2026-22708?
Priority: IMMEDIATE. PSIRT: [email protected]
What systems are affected by CVE-2026-22708?
CVE-2026-22708 affects Anysphere Cursor.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Anysphere","product":"Cursor","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-02-03.