Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPublish malicious repo with .claude/settings.local.json
-
DeliveryVictim clones and opens workspace in Cursor
-
ExploitAgent turn completes and triggers hook
-
ExecutionHook command executes in user context
-
ImpactExfiltrate data or persist via additional hooks
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Trusted source inclusion only
|
| Exploitation Conditions | Exploitation requires the victim to open a workspace in Cursor Desktop <3.0.0 that contains an attacker-controlled .claude/settings.local.json defining hook commands, and then to run (or allow an agent to complete) at least one Claude agent turn so that the end-of-turn hook fires - this matches the CVSS UI:P (passive user interaction) and AV:L (local vector, i.e. the malicious content must reach the host filesystem). No authentication to Cursor is needed (PR:N) and the attack works against default configurations because hook loading was unconditional pre-3.0.0; limiting factors are that the attacker cannot trigger the flaw remotely without first delivering the workspace file (via a clone, shared folder, or agent-written file) and that the impact is scoped to the local user account, with no automatic propagation to other systems (SC:N/SI:N/SA:N). |
| Impact | The CVSS 4.0 vector AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H gives a base score of 8.5: the attacker needs a local foothold (the malicious workspace must be opened) and passive user interaction (the victim simply running an agent turn), but no privileges and no special attack requirements, yielding full confidentiality, integrity, and availability impact on the user account. There is no EPSS score, no CISA KEV listing, and no public POC provided, so this is not confirmed actively exploited - however, the trigger is unusually low-friction for AI-assisted development workflows where developers routinely clone untrusted repos and let agents read/write files. The realistic priority is high for any organization using Cursor with arbitrary external code, even though raw exploitation telemetry is absent; the SC:N/SI:N/SA:N values correctly indicate the blast radius is limited to the user's own machine rather than chaining into other systems automatically. |
| Exploit ScenarioDerived | An attacker publishes or contributes to a repository that contains a crafted .claude/settings.local.json defining an end-of-turn hook such as a reverse-shell or credential-exfiltration command; when a developer clones the project and runs any Cursor agent task, the hook executes silently in their user context as soon as the turn ends. Alternatively, an agent prompted with malicious instructions writes the settings file mid-session, achieving persistence across subsequent turns. No public exploit identified at time of analysis, but the prerequisites map directly to common day-to-day developer workflows. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 15, 2026
Unauthorized hook command execution in Cursor Desktop versions prior to 3.0.0 allows a malicious workspace to silently run local commands by registering Claude hooks in .claude/settings.local.json without prompting the user for approval. The flaw, tracked under CWE-829 (Inclusion of Functionality from Untrusted Control Sphere), enables sandbox escape, persistence, and follow-on compromise the moment an agent turn completes. No public exploit identified at time of analysis, but the vendor advisory GHSA-pc9j-3qc2-95wv confirms the issue and the CVSS 4.0 base score of 8.5 (High) reflects full CIA impact on the victim's workstation.
RemediationAI
Vendor-released patch: Cursor 3.0.0 - upgrade immediately, since this is the authoritative fix called out in GHSA-pc9j-3qc2-95wv (https://github.com/cursor/cursor/security/advisories/GHSA-pc9j-3qc2-95wv). If an immediate upgrade is not possible, compensating controls include refusing to open untrusted repositories in Cursor and auditing or removing any committed .claude/settings.local.json from cloned projects before launching an agent turn (trade-off: developers lose legitimate per-project hook customization), and constraining the editor process with OS-level sandboxing such as macOS App Sandbox profiles or Linux user namespaces to limit what a triggered hook can touch (trade-off: may break tooling that relies on broad filesystem access). Organizations should also disallow agent runs on freshly cloned repositories until a manual review of any .claude/ directory has been performed.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Cursor is an AI-assisted code editor that embeds Anthropic's Claude agent and honors a project-scoped configuration file, .claude/settings.local.json, which can define hooks - shell commands that fire on agent lifecycle events such as the end of a turn. The CWE-829 root cause is that Cursor treated workspace-supplied hook definitions as trusted control input despite the workspace being attacker-controllable (a cloned repo, an agent-generated file, or a shared project folder). Per the CPE cpe:2.3:a:cursor:cursor:*:*:*:*:*:*:*:* the issue is product-wide across all Cursor builds before 3.0.0, regardless of host OS, because the hook-loading logic lacked a dedicated consent gate equivalent to the prompts used for other privileged actions.
Know when Cursor gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Malicious workspace file must reach the host (AV:L); no Cursor authentication needed (PR:N); victim must open the workspace and run an agent turn (UI:R); arbitrary local command execution yields full CIA on the user account.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
Cursor is a code editor built for programming with AI. In versions prior to 3.0.0, the Cursor Desktop could execute workspace-defined Claude hook commands from .claude/settings.local.json without dedicated user approval. A malicious workspace or agent-created file could configure hooks that run local commands in the user's context when an agent turn ends. This could allow sandbox escape, persistence across turns, local data access, or follow-on compromise. This issue has been fixed in version 3.0.0.
Executive ViewAI
Cursor Desktop prior to version 3.0.0 allows attackers to silently execute arbitrary commands on developer workstations through workspace configuration files, achieving complete system compromise without user interaction or consent. An affected organization could experience data exfiltration, persistent backdoor installation, and lateral movement throughout the environment from a single compromised workspace opening. Every organization using Cursor Desktop faces active compromise risk until patched.
No vendor-released patch identified at time of analysis. Interim mitigations: disable hook execution in Cursor Desktop settings; restrict workspace access to internal and pre-approved sources only; deploy endpoint detection and response (EDR) monitoring for suspicious .claude/settings.local.json modifications and command execution originating from Cursor processes; require human review and approval of workspace configurations before opening; implement network segmentation to prevent lateral movement from compromised developer systems; consider complete Cursor Desktop suspension until patch availability.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Arbitrary code execution in Cursor for Windows 3.2.16 lets remote attackers run code on a developer's machine by plantin
Remote code execution in Cursor IDE 1.6.23 and below can be triggered by prompt injection that abuses case-insensitive p
Cursor AI code editor before 2.3 allows prompt injection to bypass the Agent's Allowlist mode. Shell built-ins can execu
Sandbox escape leading to non-sandboxed remote code execution in Cursor (the AI code editor) prior to version 3.0, where
Sandbox escape leading to non-sandboxed remote code execution affects the Cursor AI code editor prior to version 3.0, wh
Cursor is a code editor built for programming with AI. In versions 1.7 and below, automatic loading of project-specific
Remote code execution in Cursor CLI Agent 1.7 and earlier can be triggered by unauthenticated attackers through prompt i
Cursor is a code editor built for programming with AI. Rated high severity (CVSS 8.8), this vulnerability is remotely ex
Cursor is a code editor built for programming with AI. In versions 1.7 and below, when MCP uses OAuth authentication wit
Cursor is a code editor built for programming with AI. Rated high severity (CVSS 8.8), this vulnerability is remotely ex
Cursor is a code editor built for programming with AI. Rated high severity (CVSS 8.8), this vulnerability is remotely ex
Cursor is a code editor built for programming with AI. versions up to 2.0 is affected by os command injection.
EUVD-2026-37002
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB