CVE-2026-31854 Cursor Affected by Arbitrary Code Execution via Prompt Injection and Whitelist Bypass

High 8.7 Published Updated
Exploited in the wild
Not known
Fix
None listed

What is CVE-2026-31854?

CVE-2026-31854 is a high-severity vulnerability in cursor, published on 11 Mar 2026.

Official description

Cursor is a code editor built for programming with AI. Prior to 2.0 ,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. This vulnerability is fixed in 2.0.

Weakness: CWE-78

Which versions are affected by CVE-2026-31854?

It affects 1 product.

Products include Anysphere Cursor.

How do I fix CVE-2026-31854?

No fix has been published for CVE-2026-31854 yet. Limit exposure of the affected software until one is available.

Is CVE-2026-31854 being exploited?

There is no known exploitation of CVE-2026-31854 in the wild and no public exploit code.

Sources

Is CVE-2026-31854 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free