CVE-2025-59536: Claude Code can execute commands prior to the startup trust dialog
A bug in Claude Code's startup trust dialog let code inside a project run before the user accepted the dialog. Opening Claude Code in an untrusted directory was enough. Versions of `@anthropic-ai/claude-code` before 1.0.111 are affected. Auto-update users already have the fix.
Published Oct 3, 2025 · Analysis Nov 1, 2026
What an attacker can do
Claude Code asks whether you trust a folder before it acts on that folder's configuration. The advisory says a flaw in that dialog's implementation let code contained in the project execute before the user answered. The CWE is code injection (CWE-94). The advisory does not name the exact file or setting that was abused.
The attacker needs the victim to start Claude Code in a directory the attacker controls. A cloned repository, a downloaded sample project or an unpacked archive all qualify. The CVSS 4.0 vector sets user interaction to passive, no privileges, and high impact on confidentiality, integrity and availability. The victim does not have to approve anything, because the code ran before the dialog could act as a gate.
The code runs with the developer's own rights. That gives access to source code, SSH keys, cloud credentials, and environment variables with API tokens. Developers who review unfamiliar repositories with an AI agent are the main group at risk.
Who is affected
Affected: @anthropic-ai/claude-code before 1.0.111. The risk applies when you start the CLI inside a project you did not write or review. Standard auto-update has already moved most installs past the fix, but manually pinned or air-gapped installs may not be.
Check your version:
claude --version
npm ls -g @anthropic-ai/claude-code@anthropic-ai/claude-code
- Ecosystem
- npm
- Affected
- < 1.0.111
- Fixed in
- 1.0.111
- Check
npm ls @anthropic-ai/claude-code
How to fix it
Upgrade to @anthropic-ai/claude-code 1.0.111 or later:
npm install -g @anthropic-ai/claude-code@latestThe advisory says users on standard auto-update received the fix automatically, and that manual updaters should move to the latest version. It names no workaround. Until you update, do not open Claude Code in directories from sources you do not trust.
How to tell if you were hit
The advisory gives no log line or indicator. Review the shell history, process list and recent file changes of machines where an old Claude Code version was started in a cloned or downloaded project. Look for child processes of the claude process you did not expect, and for outbound connections made right at startup. Check the project folder for hooks, scripts or settings files you did not write. Beam records agent shell commands and file access, which helps you reconstruct what ran after an agent session starts.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Due to a bug in the startup trust dialog implementation, Claude Code could be tricked to execute code contained in a project before the user accepted the startup trust dialog. Exploiting this requires a user to start Claude Code in an untrusted directory.
Users on standard Claude Code auto-update will have received this fix automatically. Users performing manual updates are advised to update to the latest version.
Thank you to https://hackerone.com/avivdon for reporting this issue!
Questions
- Is Claude Code 1.0.110 affected by CVE-2025-59536?
Yes. Every version before 1.0.111 is listed as vulnerable. Version 1.0.111 contains the fix.
- Does it need me to click yes on the trust dialog?
No. The flaw let project code run before the user accepted the dialog. The only action needed is starting Claude Code in the untrusted directory.
- Do I need to update by hand?
Not if you use standard auto-update, since the fix was delivered automatically. If you update manually or pin a version, upgrade to 1.0.111 or later.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
Coverage on the Beam blog
More Claude Code vulnerabilities
All Claude Code entriesCVE-2026-88968
Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace
high7.7Nov 9, 2026CVE-2026-86063
Claude Code: Plugin Hash Pin Bypass Allows Bypass of Hash Pinning
high7.5Oct 15, 2026CVE-2026-55607
Claude Code: Sandbox Escape via Git Worktree Path Confusion Allows Unsandboxed Code Execution
high7.7Jul 24, 2026CVE-2026-46406
@anthropic-ai/claude-code has an Insecure Temporary File in /copy Command that Enables Response Disclosure and Symlink-Based File Write
medium4.4Jun 25, 2026CVE-2026-54316
Claude Code: Out-of-Band Data Exfiltration via Pre-Approved HuggingFace Domain in WebFetch
medium9.1Jun 17, 2026CVE-2026-40068
Claude Code: Trust Dialog Bypass via Git Worktree Spoofing Allows Arbitrary Code Execution
high7.7Apr 24, 2026
