TL;DR: A zero-click arbitrary code execution flaw in Cursor remained unpatched for more than six months after disclosure, according to Mindgard, and the issue turned on a repository-open action that could execute attacker-controlled code without warning. The case shows that AI development tools need secure defaults that preserve normal workflows instead of shifting trust decisions onto users.
At a glance
What this is: Mindgard argues that a Cursor zero-day crossed a trust boundary by executing code when a repository was opened, not after an explicit action by the user.
Why it matters: That matters because AI development environments are becoming trusted execution surfaces, and IAM and security teams need controls that keep repository inspection and code execution separate.
Context
A secure development environment should let a user inspect untrusted code without executing it. In this case, the core problem is not only the presence of a vulnerability, but the collapse of the expected boundary between opening a repository and running code.
The article uses a zero-day disclosure in an AI coding tool to show how rapidly AI-assisted developer workflows can outgrow their safety model. That makes the issue relevant to teams governing AI red teaming for identity abuse and other AI systems where tool use and execution are tightly coupled.
Key questions
Q: What breaks when an AI development tool can execute code while opening a repository?
A: The trust boundary breaks. Developers expect repository opening to mean inspection, not execution, so a product that can silently run code from the workspace removes the user’s ability to make a meaningful security decision. That creates a path for arbitrary code execution from ordinary developer workflows and makes the tool unsafe for untrusted code review.
Q: Why do AI coding tools need stronger trust boundaries than traditional editors?
A: Because they often combine file access, prompt handling, tool invocation, and automation in one interface. That means a single unsafe decision can cross from reading code into executing it. Traditional editors can often remain passive, but AI coding tools increasingly act on the environment, so their trust boundaries need explicit enforcement, not assumptions about user caution.
Q: How should security teams govern AI use in developer tooling?
A: Security teams should govern AI use as a data and access problem, not only a productivity feature. Define what information can be sent to models, require human review of generated code, and apply least privilege to connected repositories and tools. Approved use cases should be explicit, monitored, and revisited as model capabilities expand.
Q: What should organisations do when a vendor treats unsafe execution as shared responsibility?
A: Treat the claim as a governance signal, not a resolution. If the product can trigger execution before the user makes an informed choice, the vendor has not exposed a usable trust boundary. Organisations should require a remediation commitment, validate the fix against the specific execution path, and block deployment until the risk is demonstrably contained.
Technical breakdown
How unsafe executable search paths turn a folder open into code execution
The vulnerability described here arises when software resolves an executable from locations that include attacker-controlled directories, rather than from a trusted absolute path. If a malicious repository contains a file named like a legitimate tool, the application can locate and execute it as part of normal project opening. That is a classic trust-boundary failure: the user action is inspection, but the software silently upgrades it into execution. This is especially dangerous in developer tools because they routinely handle untrusted repositories, proof-of-concept code, and third-party examples. The right design is to separate viewing from execution so that project initialization cannot invoke arbitrary binaries from the workspace. See the Zero-Day and Exploited Vulnerabilities Guide.
Practical implication: Treat repository-open paths as execution-sensitive and restrict binary resolution to trusted locations only.
Why shared responsibility breaks when the user never sees the decision
Shared responsibility works only when the system exposes the choices it expects the user to make. In this case, the vendor argues that customers should assess repository risk, but the reported behavior removed the visible decision point: opening a folder could trigger execution without prompt, warning, or consent. That means the trust decision was not meaningfully delegated to the user. In secure design terms, the application moved a security boundary into hidden logic. For AI tools, this matters because they increasingly combine code access, prompt handling, tool invocation, and automation. If those controls are not surfaced clearly, the product turns ordinary developer behavior into an implicit approval for unsafe actions.
Practical implication: Require visible consent and explicit policy enforcement before any AI coding tool can act on repository contents.
Threat narrative
Attacker objective: The attacker’s objective is to gain arbitrary code execution on a developer workstation by abusing the tool’s trust in repository contents.
- Entry occurred when a developer opened an untrusted repository containing a malicious executable named to resemble a trusted tool.
- Credential or execution opportunity arose when the application’s binary resolution logic searched the workspace and selected the attacker-controlled file.
- Impact followed when the tool executed arbitrary code without warning, turning routine repository inspection into code execution.
Breaches seen in the wild
- Microsoft SAS token exposure 2023: An over-permissive Azure SAS token in a Microsoft AI GitHub repo exposed 38TB, including workstation backups and Teams messages, for 3 years.
- 12,000 secrets in LLM training data: Truffle Security found 11,908 live API keys and passwords hard-coded in web pages captured by Common Crawl, a dataset used to train LLMs.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
AI development tools are now identity and execution platforms, not just editors. Once a product can inspect repositories, invoke tools, and run commands, it inherits the governance burden that used to sit with local developer machines. That shifts the question from feature design to control design: what can execute, when, and under whose authority? Practitioners should treat these tools as privileged workflows that require explicit boundary enforcement, not as benign productivity software.
Shared responsibility fails when the software hides the decision it claims the customer owns. Cursor’s position assumes users can meaningfully judge every repository before opening it, but the reported behavior executed code before any such judgment could be exercised. That is the exact point where responsibility returns to the vendor: the control failed to present a visible trust boundary. Security programmes should evaluate whether their AI tooling makes unsafe actions observable before they become executable.
This is a repository-trust problem, not just a patch-delay problem. The six-month delay matters, but the deeper issue is that developers routinely open unfamiliar code as part of normal work, and secure design must accommodate that reality. The industry has already learned this lesson in other software classes, and AI development environments should not recreate it. The practitioner implication is simple: if opening a project can run code, the tool is governing trust, whether or not it admits it.
Secure-by-default AI tooling has become a governance expectation, not a competitive feature. AI vendors are racing to add autonomy, but autonomy without visible control boundaries increases the chance that ordinary workflows become attack paths. The market will increasingly sort products by whether they preserve inspection as inspection and execution as execution. Security leaders should press vendors on default protections, because the acceptable baseline is now the prevention of silent execution.
AI trust boundaries must be tested the same way identity controls are tested. The relevant question is not only whether the product can perform a task, but whether it can do so without crossing an implicit authorisation boundary. That makes AI red teaming, secure default review, and repository handling tests essential parts of programme governance. Teams should validate the conditions under which code, prompts, and tools can be activated before they approve broader deployment.
Read next: Red Teaming AI Agents for Identity Abuse
What this signals
Silent execution is the real governance failure here. The issue is not simply that a vulnerability existed, but that an ordinary repository-open action could become an implicit authorisation event. For AI adoption programmes, that means the control question shifts from “can the tool help?” to “can the tool act without a visible trust decision?” Security leaders should demand proof that inspection and execution remain separate before expanding use.
AI red teaming needs to include developer workflow abuse, not just model misuse. Tools that touch repositories, prompts, and command execution can fail in ways that look like routine productivity features until they are tested against untrusted inputs. That makes repository handling, path resolution, and trust-state transitions part of the evaluation surface. Organisations should expect these cases to appear more often as AI assistants move closer to the build and deploy path.
For practitioners
- Audit repository-open execution paths Test whether opening an untrusted project can trigger binary resolution, script execution, or tool invocation before the user explicitly permits it.
- Disable unsafe default trust settings Review whether workspace trust, restricted modes, and similar safeguards are enabled by default, and treat opt-in protection as insufficient for production use.
- Separate inspection from execution Require the product to keep code review, project loading, and command execution on distinct control paths so that one cannot silently trigger the others.
- Red team repository handling Add tests for malicious filenames, path confusion, and workspace-controlled executables to confirm the tool cannot execute attacker-supplied binaries during normal use.
Key takeaways
- The core issue was a collapsed trust boundary, where opening a repository could lead to code execution without visible consent.
- The article shows that the vulnerability remained unpatched for more than six months after disclosure, which raises governance as well as technical concerns.
- The practical fix is to separate inspection from execution and to verify that default trust settings do not leave users exposed.
Related NHI Mgmt Group resources: Red Teaming AI Agents for Identity Abuse · AI Red Teaming Guide · Red Teaming Guide
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST AI RMF sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI02 — Tool Misuse | The issue centers on an AI tool invoking unsafe actions from a repository context. |
| ASI03 — Identity & Privilege Abuse | The tool crossed a trust boundary and exercised execution authority without visible user consent. | |
| Recommendation — Test agentic tools for unintended tool invocation and block workspace-triggered execution paths. Enforce explicit approval before any agentic system can act on repository contents. | ||
| NIST AI RMF | GOVERN — AI Governance and Accountability | The article is about governance expectations for secure-by-default AI tooling. |
| Recommendation — Define accountability for trust-boundary failures and require pre-deployment review of execution paths. | ||
| MITRE ATT&CK | TA0002; TA0004 — Execution; Privilege Escalation | The described behavior enabled arbitrary code execution and could elevate local control over the environment. |
| Recommendation — Map repository-triggered execution paths to ATT&CK and hunt for local execution abuse in testing. | ||
Key terms
- Trust Boundary: A trust boundary is the point where one system’s authority should stop and another system’s authority should begin. For internal automation, weak trust boundaries let monitoring, remediation, and execution share privileges that should have remained separate.
- Workspace Trust: A trust control in code editors that separates passive file viewing from active execution of project-defined tasks. When disabled or bypassed, the editor can run repository instructions in the user’s context, which turns source control content into an execution path.
- Arbitrary Code Execution: Arbitrary Code Execution is a vulnerability condition where an attacker can run code of their choice on a target system. Defenders prioritise patching, input validation, least privilege and exploit mitigation because successful exploitation can lead to full host compromise, credential theft, lateral movement or destructive actions.
- Secure by default: Secure by default means the safest configuration and workflow is the one the system encourages by design. For identity products, that usually means least privilege, auditability, and revocation paths are built into the normal user journey instead of being added as manual exceptions later.
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It helps practitioners connect identity controls to the broader security decisions that AI and development programmes now depend on.
Published by the NHIMG editorial team on October 22, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org