Remote code execution flaw in Cursor AI code editor enables automatic malware execution
Security researchers at Oasis Security disclosed a critical vulnerability in Cursor, an AI-powered code editor, that allows attackers to automatically execute malicious code when developers open compromised repositories. The flaw results from Cursor's default configuration that disables a security verification feature to preserve automated functionality.
What happened
Oasis Security discovered a critical remote code execution vulnerability in Cursor, an AI-powered code editor. The flaw allows attackers to automatically execute malicious code when a developer opens a code repository containing a .vscode/tasks.json configuration file.
The vulnerability exists because Cursor's "Workplace Trust" feature is disabled by default, a setting that Cursor said it maintains to avoid interfering with core automated features that users depend on. With this security verification step disabled, malware embedded in repositories runs automatically without warning.
Reported impact
According to Oasis Security, the vulnerability could leak sensitive credentials, modify files, or serve as a vector for broader system compromise, potentially placing Cursor users at significant risk from supply chain attacks. The exploit could open a direct path to unauthorized access with an organization-wide blast radius.
Index analysis
The vulnerability stems from Cursor's default configuration, which prioritizes user convenience over security by disabling the Workplace Trust feature. This design decision leaves developers vulnerable to supply chain attacks when opening untrusted code repositories.
Governance controls
Cursor recommended either enabling Workspace Trust or using a basic text editor when working with suspected malicious repositories.
Classification
Sources and evidence
This record was researched and written by the Index, based on the following original reporting.