Cursor Flaw Lets Malicious Cloned Repositories Trigger Windows Code Execution
Cursor flaw allows malicious cloned repos to execute arbitrary code on Windows.
A critical vulnerability in the Cursor AI-powered code editor for Windows allows attackers to achieve arbitrary code execution by tricking users into opening a malicious repository. If a cloned repository contains a file named 'git.exe' in its root directory, Cursor will execute it without any user prompt or warning, granting the attacker access to the user's source code, SSH keys, and cloud tokens. The flaw, reported by Mindgard, remains unpatched and unaddressed by Cursor.
AI summary of the linked source. Not reviewed by an editor. How this works
Run Mindgard?
Get an email when a new story names Mindgard, usually within the hour.
Free. Your list stays private and never appears in a subject line. One click stops it. How Vendor Watch worksPrivacy
The lesson from this incident
Full lessonThe root cause of this vulnerability is a dangerous configuration flaw in Cursor's Windows build: the application resolves executable names using the current working directory before checking system PATH locations, a classic 'binary planting' or 'DLL/EXE hijacking' pattern. An attacker simply needs to name a malicious binary 'git.exe' and place it in a repository root — when a victim clones and opens the project, Cursor silently executes it. This is particularly severe because developers routinely clone untrusted or unfamiliar repositories as part of their workflow, making the attack surface wide. The unpatched status compounds the risk, as there is currently no vendor fix available, leaving all Windows Cursor users exposed to full credential and source code compromise.
What helps against this
How we list vendors- Endpoint detection and response (EDR and XDR)
Malware and hands-on-keyboard attackers on laptops and servers get spotted and stopped.
- Network segmentation and microsegmentation
One compromised machine can no longer reach everything else.
- Security awareness training and phishing simulation
People recognise and report attacks instead of falling for them.