NomShub Cursor AI Flaw Could Let Malicious Repositories Hijack Developer Macs

Summary
Straiker disclosed NomShub, a Cursor AI exploit chain in which prompts in a malicious repository could trigger a sandbox bypass and abuse the remote tunnel for persistent access to macOS devices. Cursor fixed the issue in version 3.0.
Key points
- Straiker said opening a malicious repository in Cursor could be enough to trigger the attack, with no further user interaction.
- The chain combines indirect prompt injection with a command sandbox bypass that abuses shell builtins to overwrite .zshenv.
- The modified shell environment could run a script to abuse Cursor’s remote tunnel and authorize an attacker-controlled GitHub session.
- Straiker said an attacker could retain access while the relevant process, authorization, and tunnel registration remained active.
- Straiker reported the issue to Cursor in early February after discovering it in January; a fix was included in Cursor 3.0.
Article Details
- Vulnerability Types
- Indirect prompt injection
- Command sandbox bypass involving shell builtins
- macOS sandbox escape through modification of .zshenv
- Exploitation Status
- unknown
- Exploit Availability
- unknown
- Patch Status
- available
MITRE ATT&CK
T1059.004 · Unix ShellThe attack chain uses shell builtins and Zsh commands to escape the sandbox and execute commands on the developer’s machine.T1219 · Remote Access ToolsThe attacker abuses Cursor’s remote tunnel feature to obtain remote shell access to the victim’s machine.T1546.004 · Unix Shell Configuration ModificationThe attack overwrites .zshenv, which runs when new Zsh shell instances start, enabling continued execution.
