INC-26-0022 confirmed high Near Miss Cursor AI Code Editor Shell Built-In Allowlist Bypass Enables Zero-Click RCE (2026)
Anysphere (Cursor) developed and Software developers using Cursor IDE deployed Cursor AI Code Editor, harming Developers who opened malicious repositories in Cursor ; possible contributing factors include prompt injection vulnerability, inadequate access controls, and insufficient safety testing.
Incident Details
| Date Occurred | 2026-01 |
| Severity | high |
| Evidence Level | corroborated |
| Impact Level | Sector-wide |
| Failure Stage | Near Miss |
| Domain | Security & Cyber |
| Primary Pattern | PAT-SEC-006 Prompt Injection Attack |
| Secondary Patterns | PAT-AGT-006 Tool Misuse & Privilege Escalation |
| Regions | north america, europe |
| Sectors | Technology |
| Affected Groups | Developers & AI Builders |
| Exposure Pathways | Adversarial Targeting, Direct Interaction |
| Causal Factors | Prompt Injection Vulnerability, Inadequate Access Controls, Insufficient Safety Testing |
| Assets & Technologies | Large Language Models, Autonomous Agents |
| Entities | Anysphere (Cursor)(developer), ·Software developers using Cursor IDE(deployer) |
| Harm Type | operational |
Pillar Security disclosed CVE-2026-22708 in the Cursor AI code editor, where shell built-in commands such as 'export' and 'typeset' bypassed the terminal allowlist even when set to empty, enabling zero-click remote code execution through indirect prompt injection that poisoned the shell execution environment.
Incident Summary
Pillar Security disclosed CVE-2026-22708 in March 2026, a vulnerability in the Cursor AI code editor where shell built-in commands such as “export” and “typeset” bypassed the terminal command allowlist even when the allowlist was configured to be empty.[1] The vulnerability enabled both zero-click and one-click remote code execution scenarios through indirect prompt injection: malicious content embedded in project files (code comments, documentation, configuration) caused Cursor’s AI agent to execute shell built-in commands that poisoned the environment variables, so that subsequent trusted commands produced malicious outcomes.[1] Cursor released version 2.3 with a fix requiring explicit user approval for any commands the server-side parser cannot classify, and updated its security guidelines to discourage reliance on allowlists as a security mechanism.[2]
Key Facts
- CVE-2026-22708: Shell built-in commands like “export” and “typeset” executed without user approval even with an empty allowlist, enabling environment poisoning for RCE[1]
- Attack mode: Both zero-click (fully automatic when project opened) and one-click (requires single user interaction) scenarios demonstrated[1]
- Mechanism: Indirect prompt injection causes the AI agent to run shell built-ins that modify environment variables; subsequent trusted commands then execute attacker-controlled payloads[1]
- Discovery: Pillar Security, March 2026[1]
- Fix: Cursor version 2.3 requires explicit user approval for any commands the server-side parser cannot classify[2]
- Policy change: Cursor’s security guidelines now explicitly discourage reliance on allowlists, acknowledging that trusted commands remain susceptible to environmental manipulation[1]
- Related: See INC-25-0008 for earlier Cursor MCP vulnerabilities (CurXecute, MCPoison)
Threat Patterns Involved
Primary: Prompt Injection Attack — CVE-2026-22708 demonstrates a particularly subtle prompt injection variant: the injected content does not directly execute a malicious command but instead causes the AI agent to run shell built-ins that poison the execution environment, so that subsequent legitimate commands produce malicious outcomes. This two-stage attack bypasses both the allowlist and human review.
Secondary: Tool Misuse & Privilege Escalation — Cursor’s Agent Mode grants the AI assistant the ability to execute terminal commands, and the vulnerability escalates from project-level file access to system-level command execution through the AI agent’s tool-calling capabilities.
Significance
- Allowlist security model failure — CVE-2026-22708 demonstrates that even when developers configure the strictest possible allowlist (empty), AI code editors can still be exploited through commands implicitly trusted by the shell, fundamentally challenging the allowlist security model for AI tool execution
- Environment poisoning as indirect execution — The two-stage attack pattern (poison environment, then trigger trusted command) is harder to detect than direct malicious command execution, as each individual step appears benign in isolation
- Open-repo-get-pwned attack class — The vulnerability shares the pattern of “clone a repository, get compromised,” where AI-enhanced development tools convert passive project files into active exploitation vectors
Timeline
Pillar Security discloses CVE-2026-22708 — shell built-in allowlist bypass enabling zero-click RCE
Cursor releases version 2.3 with fix; now requires explicit user approval for unclassified commands
Outcomes
- Recovery:
- CVE-2026-22708 fixed in Cursor version 2.3
- Other:
- Cursor's security guidelines now discourage reliance on allowlists as a security barrier
Use in Retrieval
INC-26-0022 documents Cursor AI Code Editor Shell Built-In Allowlist Bypass Enables Zero-Click RCE, a high-severity incident classified under the Security & Cyber domain and the Prompt Injection Attack threat pattern (PAT-SEC-006). It occurred in North America, Europe (2026-01). This page is maintained by TopAIThreats.com as part of an evidence-based registry of AI-enabled threats. Cite as: TopAIThreats.com, "Cursor AI Code Editor Shell Built-In Allowlist Bypass Enables Zero-Click RCE," INC-26-0022, last updated 2026-03-29.
Sources
- The Agent Security Paradox: When Trusted Commands in Cursor Become Attack Vectors (analysis, 2026-03)
https://www.pillar.security/blog/the-agent-security-paradox-when-trusted-commands-in-cursor-become-attack-vectors (opens in new tab) - CVE-2026-22708 — Cursor Terminal Tool Allowlist Bypass (primary, 2026-03)
https://v2.cvefeed.io/vuln/detail/CVE-2026-22708 (opens in new tab)
Update Log
- — First logged (Status: Confirmed, Evidence: Corroborated)