Cursor Flaws Exposed Developers to Code Execution and Secret Theft
Emerging Technology Risk · 6 sources · Updated 4mo ago · First seen Apr 29, 2026

Researchers disclosed two separate high-severity security issues affecting the Cursor AI development environment, showing how developer workstations can be compromised through both malicious repositories and rogue extensions. Novee reported CVE-2026-26268 (CVSS 8.1), an arbitrary code execution flaw that can be triggered when a developer clones a crafted repository and Cursor’s AI agent performs routine Git actions such as checkout. The attack hides a malicious pre-commit hook inside a nested bare repository, allowing code to run locally without warning or additional user approval. Cursor worked with the researchers on a fix that was completed in February 2026, and defenders were urged to update to the patched version and inspect repositories for embedded bare directories and suspicious Cursor Rules files.
A separate LayerX report found that any installed Cursor extension could access API keys and session tokens stored in a local SQLite database because the product did not isolate extensions from that credential store or use protected OS-backed secret storage. A malicious or compromised extension could silently exfiltrate credentials for Cursor services and third-party integrations including OpenAI, Anthropic, and Google, enabling account takeover, impersonation, data theft, and financial abuse. As of the report’s publication, LayerX said the extension issue remained unpatched and recommended moving secrets into encrypted system keychains and enforcing stricter extension isolation.


