CVE-2026-26268 Cursor sandbox escape via Git hooks

High 8.1 Published Updated

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.

Sources

Is CVE-2026-26268 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free