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.
Published: 2026-02-13
Score: 8.1 High
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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 yet.

History

Wed, 18 Feb 2026 18:00:00 +0000

Type Values Removed Values Added
First Time appeared Anysphere
Anysphere cursor
CPEs cpe:2.3:a:anysphere:cursor:*:*:*:*:*:*:*:*
Vendors & Products Anysphere
Anysphere cursor

Fri, 13 Feb 2026 22:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Fri, 13 Feb 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Cursor
Cursor cursor
Vendors & Products Cursor
Cursor cursor

Fri, 13 Feb 2026 17:15:00 +0000

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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-02-13T21:12:35.045Z

Reserved: 2026-02-12T17:10:53.413Z

Link: CVE-2026-26268

cve-icon Vulnrichment

Updated: 2026-02-13T21:12:30.464Z

cve-icon NVD

Status : Analyzed

Published: 2026-02-13T17:16:14.227

Modified: 2026-02-18T17:59:35.067

Link: CVE-2026-26268

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-17T20:00:09Z

Weaknesses