{"id":"CVE-2026-31854","state":"PUBLISHED","title":"Cursor Affected by Arbitrary Code Execution via  Prompt Injection and Whitelist Bypass","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.","publishedAt":"2026-03-11T17:11:52.028Z","updatedAt":"2026-03-11T17:35:37.440Z","severity":{"score":8.7,"label":"High","version":"4.0","vector":"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","source":"GitHub_M"},"assigner":"GitHub_M","products":["cursor cursor"],"affected":[{"vendor":"cursor","product":"cursor","versions":[{"version":"< 2.0","status":"affected"}]}],"references":["https://github.com/cursor/cursor/security/advisories/GHSA-hf2x-r83r-qw5q"],"weaknesses":["CWE-78"],"ingestedAt":"2026-10-29T20:11:40.391Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/31xxx/CVE-2026-31854.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-31854","state":"PUBLISHED","datePublished":"2026-03-11T17:11:52.028Z","dateUpdated":"2026-03-11T17:35:37.440Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-03-09T19:02:25.011Z"},"containers":{"cna":{"title":"Cursor Affected by Arbitrary Code Execution via  Prompt Injection and Whitelist Bypass","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"cursor","product":"cursor","versions":[{"version":"< 2.0","status":"affected"}]}],"references":[{"url":"https://github.com/cursor/cursor/security/advisories/GHSA-hf2x-r83r-qw5q","name":"https://github.com/cursor/cursor/security/advisories/GHSA-hf2x-r83r-qw5q","tags":["x_refsource_CONFIRM"]}],"metrics":[{"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":8.7,"baseSeverity":"HIGH","vectorString":"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","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-78","lang":"en","description":"CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-03-11T17:11:52.028Z"},"source":{"advisory":"GHSA-hf2x-r83r-qw5q","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-03-11T17:34:57.538712Z","id":"CVE-2026-31854","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-03-11T17:35:37.440Z"}}]}}}