SecurityDeveloper Tools

Claude Code 2.1.325: Four Security Fixes You Need to Know

Claude Code 2.1.325 shipped on November 13 with 139 changes — most of them invisible plumbing. Four are not. Anthropic patched a zstd decompression bug, flipped sandboxed Bash back behind a permission prompt, and closed two permission logic holes that had been silently bypassing deny rules for months. This is not a feature release. It is Anthropic acknowledging that the defaults were wrong.

Your .env Deny Rule Stopped Working After Every cd

This one deserves to lead. If you wrote a deny rule like Read(./.env) to prevent Claude from accessing your secrets, it was silently failing every time the session changed directories. After any cd command, the relative path in the rule stopped matching — and Claude could read your .env file freely for the rest of that session.

Version 2.1.325 fixes this: relative deny and ask rules now persist across directory changes and apply to added directories. The fix matters more than it sounds. Security researchers found over 2,500 distinct secrets exposed across nearly 2,000 GitHub repositories from Claude Code’s settings.local.json. If your deny rules weren’t sticking after a cd, your credentials were exposed in that gap.

Audit your allow and deny rules. If any use relative paths, treat the protection as unverified until you confirm it held in your actual workflow.

Sandboxed Bash No Longer Runs Without Asking

When the sandbox was enabled, Bash commands running inside it auto-approved without a prompt. The assumption was that sandbox isolation made the prompt redundant. Starting with 2.1.325, sandboxed Bash goes through the normal permission flow. If you want the previous behavior, you now have to opt into it explicitly:

{
  "sandbox": {
    "enabled": true,
    "autoAllowBashIfSandboxed": true
  }
}

This matters for teams running Claude Code in automation pipelines. Scripts that relied on silent sandbox execution will now pause for prompts. Restore the flag if you need unattended runs — but understand you are explicitly trading the safety check back off. And per Formal.ai’s sandbox analysis, the sandbox only covers Bash and the processes it launches — not Claude Code’s own Read, Edit, Write, or WebFetch tools, which follow permission rules instead.

Compound Bash Commands Were Bypassing Permissions

A compound command — anything chained with &&, ;, or || — could run its second part without a permission prompt if the first part was already allowed. In practice, that means an allowed safe command could be chained to an unapproved destructive one and sail through the check. Fixed in 2.1.325: each part of a compound command now requires its own permission approval. If you have allow rules covering compound patterns, expect new prompts where there were none before.

The zstd Fix and What Else Changed

The release also patches a security bug in how zstd-compressed responses were decoded. Anthropic has not published a CVE or an exploit path. Two non-security fixes also shipped: third-party gateway sessions were halting with context-length errors, and resumed sessions sometimes dropped recent turns. Both are resolved in 2.1.325.

How to Upgrade

npm install -g @anthropic-ai/claude-code@latest
claude --version  # should show 2.1.325

After upgrading, do three things: verify your deny rules use patterns that survive directory changes; check whether automation scripts depend on silent sandbox execution; confirm settings.local.json is in your .gitignore. The official npm page shows the current published version if you need to verify.

Anthropic is in a reactive hardening phase — this is the third security-adjacent release in two weeks, following the “Don’t Ask Again” secrets disclosure and the recent CI credential theft campaigns. The direction is right. But the pattern of shipping with permissive defaults and tightening later means configs set up months ago are running with assumptions that no longer hold. The official Claude Code permissions documentation is the reference for auditing your current setup. Do it before the next release tells you what else was quietly skipping the prompt.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:Security