Cursor Flaws Exposed Developers to Code Execution and Secret Theft
Emerging Technology Risk · 6 sources · Updated 5mo 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.
Why it matters
Impact assessment
Two high-severity Cursor issues expose developer workstations to code execution and credential theft, creating direct risk for software vendors, enterprises with developer fleets, and any users of the Cursor AI development environment. The likely business impact includes workstation compromise, theft of source code and secrets, unauthorized use of third-party AI services, account takeover, and downstream intrusion into internal engineering infrastructure.
Summary
CVE-2026-26268 affects Cursor versions prior to 2.5 and enables arbitrary code execution when developers clone and open a crafted repository that the Cursor agent interacts with. A separate unpatched extension-isolation flaw, dubbed CursorJacking, allows any installed extension to read locally stored API keys and session tokens, expanding exposure to all Cursor users who install extensions.
Scope and severity
- Affected population: Cursor users, especially developers, security engineers, and CI-adjacent engineering users handling source code and secrets.
- Affected industries: Any sector using Cursor for software development; risk is highest in technology, SaaS, finance, healthcare, defense, and other environments where developer endpoints hold privileged access.
- Severity:
- CVE-2026-26268: CVSS 8.1, arbitrary code execution on local developer machines.
- CursorJacking: CVSS 8.2, credential and session-token theft with potential account takeover and financial abuse.
- Scope of exposure:
- CVE-2026-26268 is a targeted but scalable repository-based attack path against users who clone untrusted code.
- CursorJacking is broad exposure because any malicious or compromised extension can access the credential store.
- Exploitation in the wild: The references describe proof-of-concept and researcher-demonstrated exploitation; no confirmed in-the-wild exploitation is stated.
Business consequences
- Developer endpoint compromise can expose proprietary source code, internal tooling, access tokens, passwords, and cloud credentials.
- Stolen API keys for OpenAI, Anthropic, and Google can enable unauthorized API consumption, data exposure, impersonation, and direct financial loss.
- Compromise of developer systems can serve as an entry point for broader enterprise intrusion and supply-chain risk.


