AI and data stack advisories

Severe, 6 weeks1496Projects326

1496 severe, 6 weeks · 326 projects

CursorGHSA-hf2x-r83r-qw5q

Arbitrary Code Execution via Prompt Injection and Whitelist Bypass

Cursor

CVE-2026-31854 · Published Mar 9, 2026

High
Fix: upgrade to 2.0 or later
GitHub advisory

Summary

Cursor is able to access arbitrary websites. If a visited website contains maliciously crafted instructions, the model may attempt to follow them in order to “assist” the user. When combined with a bypass of the command whitelist mechanism, such indirect prompt injections could result in commands being executed automatically, without the user’s explicit intent, thereby posing a significant security risk.

Impact

This vulnerability allows an attacker to achieve arbitrary command execution on a user’s system via the Cursor Agent, even when Auto‑Run Mode is set to “Use AllowList.” By serving malicious prompt‑injection content and bypassing the whitelist check, an attacker can execute commands without user consent, leading to potential system compromise. Any user who interacts with untrusted websites through the Cursor Agent is at risk.

Affected versions

PackageAffectedFixed in
Cursor
Product
< 2.02.0
Details and references

More Cursor advisories

All Cursor