Introduction
The Cursor AI-assisted development environment has been found to have a critical vulnerability that allows for arbitrary code execution with no user interaction required. This vulnerability has been exposed after 7 months of silence from the company, raising concerns about the security of the platform.
The Vulnerability
The vulnerability is caused by the way Cursor attempts to locate Git binaries across multiple locations, including the current workspace. If an attacker plants a malicious git.exe in the repository root, Cursor will execute it automatically as part of its path resolution logic without warning, approval, or even an indication that executable content from the repository is about to run.
Impact
The impact of this vulnerability is significant, as it allows an attacker to execute arbitrary code on a user's system without their knowledge or consent. This could lead to a range of malicious activities, including data theft, ransomware attacks, and lateral movement within a network.
Mitigation
To mitigate this vulnerability, users can take several steps. Enterprise/managed Windows systems can use AppLocker or Windows App Control policies to deny execution of the affected executable name from developer workspace directories. Consumer systems can open untrusted repositories only in an isolated VM, Windows Sandbox, or other disposable environment.
Conclusion
The exposure of the Cursor 0day vulnerability after 7 months of silence raises concerns about the security of the platform. Users must take steps to protect themselves from arbitrary code execution, and the company must take responsibility for addressing the vulnerability and communicating with its users.

