Security researchers at Straiker have discovered a critical vulnerability chain in the Cursor AI coding editor that could lead to a full compromise of a developer's machine. The attack, dubbed NomShub, enables an attacker to gain remote code execution (RCE) with no user interaction other than the developer opening a malicious code repository. The exploit cleverly combines a prompt injection in the editor's AI agent with a sandbox bypass, allowing the attacker to gain shell access. This represents a significant supply chain risk, as a compromised developer machine can be used to inject malicious code into software projects. The attack is also highly evasive, as its malicious traffic is tunneled through legitimate Microsoft Azure infrastructure.
The 'NomShub' attack is not a single flaw but a chain of vulnerabilities that work in concert:
This attack chain falls under the MITRE ATT&CK category T1195.001 - Compromise Software Dependencies and Development Tools.
The vulnerabilities were discovered by security researchers who developed a proof-of-concept (PoC) exploit. There is no evidence of in-the-wild exploitation at this time. The researchers at Straiker have responsibly disclosed the findings.
A successful 'NomShub' attack has a devastating impact. An attacker with a full shell on a developer's machine can:
The attack's stealth is a major concern. Because the reverse shell traffic is tunneled through Microsoft Azure domains used by Cursor, it is nearly impossible to detect using traditional network-level firewalls or IDS systems, as the traffic appears legitimate.
Detecting this specific attack is challenging due to its evasive nature.
sh, bash). Monitoring for processes that open outbound network connections to unexpected destinations, even within a trusted domain like Azure, could be an indicator. This is an application of D3-PA: Process Analysis.M1048 - Application Isolation and Sandboxing.The primary mitigation is to update the Cursor AI editor to a patched version as soon as it becomes available.
Mapped D3FEND Techniques:
Run development tools in a containerized or virtualized environment to limit their access to the host operating system, mitigating the impact of a compromise.
Mapped D3FEND Techniques:
To detect the 'NomShub' attack, organizations should use an EDR solution capable of deep Process Analysis on developer workstations. The key detection opportunity lies in monitoring the behavior of the Cursor AI process itself. A high-fidelity alert should be created to trigger whenever the Cursor process spawns a direct child process that is a shell (e.g., sh, bash, zsh, powershell.exe). This is highly anomalous behavior for a code editor. While the editor may legitimately call compilers or build tools, spawning an interactive shell is a major red flag. Correlating this process creation event with a recent file-open operation on a new or untrusted repository would increase the confidence of the alert. This behavioral detection is crucial because the attack's network traffic is designed to be evasive by tunneling through legitimate Microsoft Azure infrastructure.
The most direct and effective countermeasure for the 'NomShub' vulnerability is a timely Software Update. Organizations that permit the use of Cursor AI must have a robust patch management program for their development tools, not just operating systems and servers. Upon notification of this vulnerability, a policy should be enforced to push the patched version of Cursor AI to all developer endpoints immediately. This can be managed through enterprise software deployment tools. Furthermore, network access controls or application control policies could be temporarily implemented to block older, vulnerable versions of Cursor from running or accessing the network until they are updated. This ensures that the root cause of the vulnerability—the prompt injection and sandbox bypass—is eliminated from the environment, providing a definitive fix rather than relying on detective controls.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
Help others stay informed about cybersecurity threats