Arbitrary command execution via streamed newline
Published Oct 22, 2024 · Updated Oct 23, 2024
Improper input validation in Anysphere Cursor before 0.42 allows remote attackers to execute arbitrary commands in a user's terminal. Terminal Cmd-K streams a model response directly into the shell and treats attacker-influenced newline or control characters as command submission. Exploitation requires a user to import a compromised webpage into the prompt; successful injection runs commands with that user's privileges.
Summary
What happened
Improper input validation in Anysphere Cursor before 0.42 allows remote attackers to execute arbitrary commands in a user's terminal. Terminal Cmd-K streams a model response directly into the shell and treats attacker-influenced newline or control characters as command submission. Exploitation requires a user to import a compromised webpage into the prompt; successful injection runs commands with that user's privileges.
The record
- CVE
- CVE-2024-48919
- Published
- Oct 22, 2024
- Updated
- Oct 23, 2024
- Vendor
- Anysphere
- Product
- Cursor
- Classifications
- CWE-20, T1059, T1204
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Oct 22, 2024CVE publishedPublication date reported by the CVE source.
- Oct 23, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0 <0.42
- Affected versionversion=< 0.42
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Terminal Cmd-K streamed-newline demonstration payloadproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo