Cursor · Cursor · CVE-2024-48919
**Name of the Vulnerable Software and Affected Versions**
Cursor versions prior to 0.42
**Description**
The issue allows an attacker with control over a malicious web page to influence a language model to output arbitrary commands for execution in the user's terminal. This scenario requires the user to explicitly opt-in to including the contents of a compromised webpage and the attacker to display prompt injection text in the contents of the compromised webpage. A server-side patch was released on September 27, 2024, to prevent the streaming of newlines or control characters.
**Recommendations**
For versions prior to 0.42, no additional action is needed as the patch has been applied server-side.
For all versions, it is recommended to set the `"cursor.terminal.usePreviewBox"` setting to true to stream responses into a preview box, which requires manual acceptance before being inserted into the terminal.
As a best practice, only include trusted pieces of context in prompts.