Cursor Sandbox Escape Vulnerability Leading to Out-of-Sandbox Remote Code Execution
Vulnerability
A sandbox escape vulnerability has been identified in Cursor, a code editor designed for programming with AI, in versions prior to 2.5. This vulnerability allows a malicious agent to perform prompt injection that writes to unprotected .git configuration settings, including git hooks. The exploitation of this vulnerability could lead to remote code execution outside of the sandboxed environment the next time the modified git hooks are triggered. Notably, this issue does not require user interaction, as Git automatically executes the commands from the hooks.
Impact
Exploitation of this vulnerability allows for a sandbox escape, with the potential for out-of-sandbox remote code execution, particularly when the modified git hooks are executed.
Remediation
Users can upgrade to Cursor version 2.5 or later to address this vulnerability.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
