Cursor
CVE-2026-26268
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInject malicious prompt into AI agent
-
ExploitWrite to .git/hooks configuration files
-
ExecutionGit automatically executes hook commands
-
ImpactAchieve code execution outside sandbox
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization checks on every request
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation 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.5 with AI agent integration enabled; attacker must have high privilege level (PR:H) to inject prompts into the agent; requires .git repository initialization in project workspace; git hooks must be executable by git processes. |
| Impact | CVSS 8.0 (HIGH). Attack vector: Network. Complexity: High. Privileges required: High. User interaction: None. |
| Exploit ScenarioDerived | An attacker could exploit this vulnerability to compromise the affected system. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 12, 2026
Cursor versions before 2.5 allow sandbox escape through improper .git configuration file protections, enabling malicious prompts or agents to write git hooks that execute arbitrary code when git commands are triggered. An attacker can achieve remote code execution without user interaction since git automatically executes these hooks, potentially compromising systems where Cursor is used for AI-assisted development. A patch is available in version 2.5.
Earlier versions of this analysis (1)
Cursor is a code editor built for programming with AI. Sandbox escape via writing .git configuration was possible in versions prior to 2.5. [CVSS 8.0 HIGH]
RemediationAI
Fixed in version 2.5.. Restrict network access to the affected service where possible.
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
Classified as CWE-862 (Missing Authorization). Affects Cursor. Cursor is a code editor built for programming with AI. Sandbox escape via writing .git configuration was possible in versions prior to 2.5. A malicious agent (ie prompt injection) could write to improperly protected .git settings, including git hooks, which may cause out-of-sandbox RCE next time they are triggered. No user interaction was required as Git executes these commands automatically. Fixed in version 2.5.
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:H/PR:H/UI:N/S:C/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. Sandbox escape via writing .git configuration was possible in versions prior to 2.5. A malicious agent (ie prompt injection) could write to improperly protected .git settings, including git hooks, which may cause out-of-sandbox RCE next time they are triggered. No user interaction was required as Git executes these commands automatically. Fixed in version 2.5.
Executive ViewAI
Cursor, a popular AI-assisted code editor, contains a critical sandbox escape vulnerability (CVE-2026-26268) that allows attackers to bypass security controls by manipulating Git configuration files. Organizations using Cursor for development face risk of code compromise, unauthorized access to repositories, and potential supply chain attacks if exploited by malicious actors.
Until patch is available: Disable Cursor sandbox features if available; restrict Cursor usage to isolated development environments without direct access to production or sensitive repositories; implement file integrity monitoring on .git directories across development machines; apply network segmentation to prevent compromised development machines from accessing critical infrastructure; enforce code review and approval workflows to detect unauthorized repository modifications; monitor for suspicious Git configuration changes via SIEM or EDR solutions.
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
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
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. versions up to 2.0 is affected by os command injection.
NVD
CVE.org
EPSS
GitHub
Exploit-DB