Improper Input ValidationWeakness · CWE-20

CVE-2024-48919

CRITICAL · 9.2 CVSS v4.0 Published 2024-10-22
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Cursor is a code editor built for programming with AI. Prior to Sep 27, 2024, if a user generated a terminal command via Cursor's Terminal Cmd-K/Ctrl-K feature and if the user explicitly imported a malicious web page into the Terminal Cmd-K prompt, an attacker with control over the referenced web page could have a significant chance of influencing a language model to output arbitrary commands for execution in the user's terminal. This scenario would require the user explicitly opt-in to including the contents of a compromised webpage, and it would require that the attacker display prompt injection text in the the contents of the compromised webpage. A server-side patch to not stream back newlines or control characters was released on September 27, 2024, within two hours of the issue being reported. Additionally, Cursor 0.42 includes client-side mitigations to prevent any newline or control character from being streamed into the terminal directly. It also contains a new setting, `"cursor.terminal.usePreviewBox"`, which, if set to true, streams the response into a preview box whose contents then have to be manually accepted before being inserted into the terminal. This setting is useful if you're working in a shell environment where commands can be executed without pressing enter or any control character. The patch has been applied server-side, so no additional action is needed, even on older versions of Cursor. Separately, Cursor's maintainers also recommend, as best practice, to only include trusted pieces of context in prompts.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

A prompt injection vulnerability in Cursor's Terminal Cmd-K feature allowed attackers controlling imported web pages to influence the LLM to output arbitrary commands for execution in the user's terminal. The attack required users to explicitly import malicious web pages containing prompt injection text, enabling newlines/control characters to be streamed to manipulate LLM output.

MitigationThe server-side patch has already been applied. Users should update to Cursor 0.42 for client-side mitigations and consider enabling the 'cursor.terminal.usePreviewBox' setting for additional protection. As a best practice, only include trusted content in prompts.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
Authentication
X
User interaction
None
Scope
X

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Verify Cursor version
    Open Cursor, go to Help > About or check the installed package version. Compare it to the affected range (versions prior to 0.42).
    Affected if Installed version is older than 0.42 and the Terminal Cmd-K/Ctrl-K feature is used with imported web content.
  2. Check if Terminal Cmd-K/Ctrl-K feature is actively used
    Determine whether you use the Cmd-K (Mac) or Ctrl-K (Windows/Linux) keyboard shortcut in Cursor's terminal to send prompts that may include content from external webpages or files.
    Affected if The feature is used to process untrusted web content or files imported into the prompt.
  3. Inspect the cursor.terminal.usePreviewBox setting
    Open Cursor settings (JSON preferences) and search for the 'cursor.terminal.usePreviewBox' configuration option.
    Affected if This setting is disabled (false) or not present, meaning commands execute without manual acceptance.

You are affected if running a Cursor version prior to 0.42 and using the Terminal Cmd-K/Ctrl-K feature with external content, with the preview box setting disabled or absent.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

The server-side patch has already been applied. Users should update to Cursor 0.42 for client-side mitigations and consider enabling the 'cursor.terminal.usePreviewBox' setting for additional protection. As a best practice, only include trusted content in prompts.

Recommended fix High confidence

Cursor 0.42 (optional, for enhanced client-side mitigations)

  1. No action is required. The server-side patch was automatically applied on September 27, 2024, and protects all Cursor users regardless of their client version.
  2. Optional: Upgrade to Cursor 0.42 or later for additional client-side mitigations and the new "cursor.terminal.usePreviewBox" setting for extra protection in shell environments where commands execute without pressing enter.

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing3.0 h
  • Review / QA2.0 h
11.0 hours of engineering $1,930
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,088.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2024-48919 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2024-48919 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data