# Cursor Flaw Allows Malicious Repositories to Execute Code on Windows

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

- **Source:** [The Hacker News](https://brifing.si/source/f944ec2b-8180-47bc-94de-57085b5a6563)
- **Published:** 2026-07-15
- **Topic:** [Software & Engineering](https://brifing.si/c/engineering)
- **Original article:** <https://thehackernews.com/2026/07/cursor-flaw-lets-malicious-cloned.html>
- **On Brifing:** https://brifing.si/s/fbb72043-df8c-4730-913a-71b3c9c2e6a2

## Cursor'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.

## Impacts 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.

## Mindgard'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.

## Mechanism 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.

## Temporary Solutions

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

## Security 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.

## Sources covering this story

- https://thehackernews.com/2026/07/cursor-flaw-lets-malicious-cloned.html — 

---

_Summary written by Brifing from the original reporting. Copyright in the original article belongs to its publisher; read the full piece at the link above._
