CVE-2026-31854
published high CVSS 4.0 · 8.7Cursor Affected by Arbitrary Code Execution via Prompt Injection and Whitelist Bypass
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| cursor | — | cursor< 2.0 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.7 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| cursor | cursor | < 2.0 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-78 CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
References
1Provider assertions
2GitHub_M · cna
Cursor Affected by Arbitrary Code Execution via Prompt Injection and Whitelist Bypass
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- cf8b1e2e52f442b4885d5cfe68333a8ce2963416df391e26ccf932073125bc6d
- Ingested
- 23 Sep 2026, 09:09:43 UTC
- Source record
- Official CVE record