Critical Cursor bug could turn routine Git into RCE
Summary
A critical vulnerability in Cursor IDE (a code editor with AI capabilities) allowed attackers to execute malicious code on a developer's machine by embedding harmful Git hooks (automated scripts that run during repository operations) in a fake repository. When Cursor's AI agent autonomously performed routine Git operations like checking out code, it would unknowingly trigger and run the attacker's malicious scripts, giving the attacker control over the developer's computer.
Solution / Mitigation
The flaw is patched in Cursor version 2.5. According to the source, 'Sandbox escape via writing .git configuration was possible in versions prior to 2.5,' meaning the vulnerability has been fixed in version 2.5 and later.
Classification
Affected Vendors
Related Issues
CVE-2026-30308: In its design for automatic terminal command execution, HAI Build Code Generator offers two options: Execute safe comman
CVE-2026-40087: LangChain is a framework for building agents and LLM-powered applications. Prior to 0.3.84 and 1.2.28, LangChain's f-str
Original source: https://www.csoonline.com/article/4164250/critical-cursor-bug-could-turn-routine-git-into-rce.html
First tracked: April 28, 2026 at 02:00 PM
Classified by LLM (prompt v3) · confidence: 92%