CVE-2026-26268 Cursor sandbox escape via Git hooks
A malicious AI agent can escape the sandbox by writing to Git hooks, enabling remote code execution without user interaction.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-26268?
CVE-2026-26268 is a high-severity code injection vulnerability in cursor, published on 13 Feb 2026. An attacker needs administrator access to exploit it, with no action from the victim.
Official description
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.
Weakness: CWE-862
Which versions are affected by CVE-2026-26268?
It affects 1 product.
Products include Anysphere Cursor.
How do I fix CVE-2026-26268?
No fix has been published for CVE-2026-26268 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-26268 being exploited?
There is no known exploitation of CVE-2026-26268 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in cursor
- CVE-2026-50548 Cursor Desktop sandbox escape via agent-controlled working directory
- CVE-2026-50549 Cursor Desktop sandbox escape via symlink and failed path canonicalization
- CVE-2025-64106 Cursor: Speedbump Modal Bypass in MCP Server Deep-Link
- CVE-2025-64107 Cursor is Vulnerable to Path Manipulation Using Backslashes on Windows
- CVE-2025-64108 Cursor's Sensitive File Modification can Lead to NTFS Path Quirks