CVE-2026-26268

Cursor sandbox escape via Git hooks

Published Feb 13, 2026 CVSS 3.1 · 8.1 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Cursor, a code editor that integrates AI features, had a vulnerability that allowed an attacker to escape the sandbox by writing to improperly protected .git configuration files, including git hooks. This flaw, identified in versions prior to 2.5, permits malicious agent prompts to alter the .git settings, which can lead to execution of arbitrary code outside the sandbox environment. The weakness is a form of missing access control, as the editor fails to enforce proper permissions on these configuration files. The consequence is a high‑risk scenario where untrusted input can result in arbitrary code execution without any user interaction.

Affected Systems

This issue affects the Cursor code editor product from cursor:cursor for all releases older than version 2.5. Any deployment using those older versions is vulnerable unless the .git configuration files are manually patched or the application upgraded.

Risk and Exploitability

The CVSS score of 8.1 indicates a high severity, and the EPSS score of less than 1% suggests that exploitation is unlikely at present. Since the flaw relies on Git automatically executing hooks, an attacker can trigger the vulnerability simply by having the editor run Git operations, irrespective of user actions. The attack vector is inferred to be local execution triggered by automatic Git processes, and the exploitation conditions do not require privileged access beyond what a malicious prompt injection can provide. Because the vulnerability is not listed in the CISA KEV catalog, no known widespread exploitation has been reported, but the potential for zero‑click remote code execution remains significant for affected installations.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Cursor to version 2.5 or newer, which removes the insecure handling of .git configuration writes.
  • As a temporary measure, delete or disable any existing git hooks in the repository’s .git/hooks directory to eliminate the execution path that can be abused.
  • Configure the editor to reject any attempts to modify .git configuration files from AI prompts, ensuring that prompt injection cannot write to the .git directory; alternatively, restrict file system permissions on the .git folder to prevent write access by the editor process.

Generated by OpenCVE AI on April 17, 2026 at 19:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Anysphere
Anysphere cursor
CPEs cpe:2.3:a:anysphere:cursor:*:*:*:*:*:*:*:*
Vendors & Products Anysphere
Anysphere cursor
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Cursor
Cursor cursor
Vendors & Products Cursor
Cursor cursor
Type Values Removed Values Added
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.
Title Cursor sandbox escape via Git hooks
Weaknesses CWE-862
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 13, 2026, 9:12 PM
Reserved
Feb 12, 2026, 5:10 PM
Status
Analyzed
Published
Feb 13, 2026, 5:16 PM
Modified
Jun 17, 2026, 10:26 AM