Brifing

Cursor Flaw Allows Malicious Repositories to Execute Code on Windows

Cursor's vulnerability enables malicious repositories to execute code without user consent.

The Hacker News1 min

1Cursor's Security Flaw

Cursor automatically executes the git.exe file in the root directory when opening a repository on Windows. This happens without any user approval and can lead to the execution of malicious code.

2Impacts and Risks

This vulnerability can access the user's source code, SSH keys, and cloud tokens. If left open, malicious code will continue to run as long as the project is open.

3Mindgard's Discovery

AI security firm Mindgard reported this vulnerability to Cursor in December 2025. However, seven months later, no patch has been released, and Cursor has not issued any advisory on the issue.

4Mechanism of Operation

Cursor searches for the Git binary when a project is loaded, and one of the locations is the workspace itself. This leads to the automatic execution of a malicious binary.

5Temporary Solutions

Mindgard recommends using AppLocker or Windows App Control on managed Windows systems. Additionally, opening untrusted repositories in virtual machines is advised.

6Security Process and Responses

Mindgard's report was initially classified as 'informative and out of scope' by Cursor. However, it was reopened after verification by HackerOne. Cursor's security advisories still do not cover this vulnerability.

Original article: The Hacker News — Cursor Güvenlik Açığı: Kötü Amaçlı Depolar Windows'ta Kod Çalıştırabiliyor