TLDR InfoSec · ATTACKS & VULNERABILITIES

CURSOR'S AUTORUN LETS HACKERS EXECUTE ARBITRARY CODE

csoonline.com6 min read

Summary from the TLDR InfoSec newsletter

Cursor's AI-powered code editor ships with Workspace Trust disabled by default, allowing malicious repositories to automatically execute code through crafted ".vscode/tasks.json" files the moment a developer opens a folder, without any user prompts or warnings. Attackers can inject these malicious task files into public repositories, enabling them to compromise developer machines and access sensitive data, including API keys, cloud credentials, and SaaS sessions, simply through the act of browsing a project. Unlike VS Code, which does not auto-run tasks in default configurations, Cursor executes these tasks immediately after opening a project folder, creating a significant supply chain attack vector for the platform's one million users.