Update Claude Code to 2.1.251 or later

Claude Code: a race in the Edit tool let code in the sandbox overwrite files outside your project (CVE-2026-88968), fixed in 2.1.251 · Security incident · GitHub Advisory Database · anthropics · Nov 9, 2026

What happened

Anthropic's advisory says Claude Code checked where an Edit was going at one moment but wrote later, so on macOS code running in its Bash sandbox (for example from a malicious repo or dependency script) could swap a folder for a symlink in between and make the unsandboxed Edit tool overwrite a file outside the workspace. Auto-update users already have the fix.

How to prevent it

Check you are on Claude Code 2.1.251 or later (manual installs don't update themselves), and treat 'the sandbox will contain it' as one layer, not a reason to run unknown repos.

Fix prompt for your own AI tool

Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.

I use Claude Code. Help me check I'm protected from CVE-2026-88968 and similar sandbox escapes. 1) Tell me how to see which Claude Code version I have and whether it auto-updates; the fix is in 2.1.251. 2) List the repos and dependency install scripts I've run in the last month that I didn't write myself. 3) Suggest settings that need my approval before Bash commands, file edits outside the project and network calls. 4) Give me a 5-step checklist for opening an unfamiliar repo safely. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.

Why this keeps happening: trusting agents & ai input

An AI agent treats everything it reads as possible instructions: a web page, a README, an email, a code comment or the output of another tool. If that content was written by an attacker, the agent can be steered into running commands, reading files or sending data somewhere it should not.

A quick checklist before you ship

More on this: every trusting agents & ai input story and our related guide.

Tools involved

Claude Code stories

Related stories

Source: original post on GitHub Advisory Database ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.

The Honest Build. Real stories, not hype.

Every week: real stories of what building with AI actually took, the one lesson worth keeping, and the security slip-ups to avoid. Free, unsubscribe anytime. Weekly, every Friday.