[KongchangAI]
· 3 min read· 1,714 words

Claude Code v2.1.321 Released: Fable 5.2 Model and Security Fixes

Claude Code v2.1.321 Released: Fable 5…

Claude Code v2.1.321 upgrades the default model to Fable 5.2 and focuses on fixing security vulnerabilities such as the MCP OAuth credential leak.

Claude Code released v2.1.321, with the core change being that Claude Fable 5.2 (claude-fable-5-2) becomes the default Fable model, supporting a 1M context window, priced at $8 per million input tokens, $40 per million output tokens, and $0.20 per million cache reads, positioned against frontier models; migration from the old version for Team/Enterprise users requires organizational permission, and users can switch back with /model claude-fable-5-1. On the security side, it fixes the MCP OAuth leak vulnerability where refresh tokens and other secrets were sent to other hosts during server redirects, and patches permission boundary issues such as read-only Bash commands escaping the sandbox, Bash permission checks judging writes from the wrong directory, and cp/mv target files not being subject to deny rules; it also rejects filenames containing bidirectional text control characters. Additionally, it fixes numerous stability defects involving network paths, background subagents, and Windows startup performance.

Claude Code v2.1.321 Update Overview

Claude Code has released version v2.1.321, bringing a major model upgrade: Claude Fable 5.2 is now the default Fable model. This release also fixes a large number of stability and security issues, with the patch for an MCP OAuth credential leak vulnerability being particularly noteworthy.

According to the release notes, the new model claude-fable-5-2 supports a 1M context window, priced at $8 per million input tokens and $40 per million output tokens, with cache reads at $0.20 per million tokens. This pricing and context specification directly targets the positioning of current mainstream frontier models.

For developers who use Claude Code daily, the details following the version number...

Key Changes at the Model and Configuration Level

Fable 5.2 Becomes the Default Model

claude-fable-5-2 replaces the previous version as the default choice in the Fable series, meaning sessions that don't manually specify a model will automatically use the new version. For enterprise users, the release notes state that users who saved a Fable 5.1 selection will be migrated to the new fable alias: Pro and Max plans take effect immediately, while Team and Enterprise plans take effect once the organization permits it. To switch back to the old version, you can manually specify /model claude-fable-5-1.

New Configuration Support for Remote Control

The claude remote-control command adds a --settings <file> parameter that applies a configuration file to every session it launches. There's a notable behavior design here: if that configuration file changes, it will not automatically take effect for new sessions—you must restart claude remote-control to load the new configuration. This conservative approach avoids the risks of inconsistency between the running configuration and the startup configuration.

Model Selector and Plan Prompt Improvements

The /model selector has an improved layout: "More models" is now an unnumbered row below all other options, and older models expand within it without affecting the numbering of other items. Additionally, the "Upgrade to Max" option has been updated to "Upgrade to Max or Ultra," and the allowedProviders setting description now includes the Ultra tier. These changes suggest that the Ultra subscription tier is gaining more formal product exposure.

Security Fixes: The Focus of This Update

Security-related fixes occupy a significant portion of this release's notes, with several deserving individual mention.

MCP OAuth Credential Leak Vulnerability

The release notes explicitly state: fixed an issue where "MCP OAuth requests sent refresh tokens and other secrets to another host when the server redirected." This is a typical credential leak risk caused by open redirects—if an attacker can control the redirect target, they could intercept OAuth refresh tokens. This fix is particularly important for users of remote MCP servers.

MCP (Model Context Protocol) is an open protocol introduced by Anthropic to let AI applications connect to external tools and data sources (i.e., MCP servers) in a standardized way. When an MCP server is remote, authentication is typically completed using the OAuth 2.0 authorization framework: the client first obtains a short-lived access token along with a refresh token—the latter has a longer validity and can be used to silently obtain new tokens after the access token expires, so once leaked, an attacker can continue accessing that account's resources for an extended period.

The redirect step in the OAuth flow is a key trust boundary: the client will carry credentials and follow the redirect address returned by the server. If the implementation does not verify that the redirect target's host matches the original host, it may send secrets such as refresh tokens to a third-party host—this is the typical form of an "open redirect" vulnerability. The general defense is to strip sensitive credentials on cross-host redirects, or to only allow redirects to a pre-registered allowlist of callback addresses.

Patches for Sandbox and Permission Check Vulnerabilities

Several permission-related issues were fixed: read-only Bash commands could run outside the sandbox without a permission prompt; Bash permission checks previously judged file writes from the wrong folder without prompting; target files weren't correctly subject to deny rules and protected-file prompts when cp or mv wrote to directories. These are all inconsistencies in permission boundary enforcement, and any one of them could be exploited to bypass established policies.

Sandbox in this context refers to the isolation layer Claude Code sets up for operations such as executing Bash commands, used to restrict filesystem writes, network access, and other capabilities so commands can run safely without item-by-item confirmation. Paired with this is the permission prompt mechanism: when an operation exceeds the sandbox's allowed scope, the tool should pause and request user authorization.

The fixed issue where "read-only Bash commands could run outside the sandbox without prompting" is essentially an inconsistency between classification and execution boundaries: the command was classified as read-only and thus skipped the prompt, but the actual execution path escaped sandbox constraints. Similarly, when cp/mv wrote to directories, target files weren't subject to deny rules—this is a wrong rule-matching target selection: the check examined the source path or surface command-line arguments but missed the actual target file being written. Such defects don't trigger obvious errors, yet they can render established security policies ineffective, so the correctness of a permission system often depends on covering numerous edge-case command forms one by one.

Other Security Details

Fixed an issue where claude mcp login repeatedly printed the SEP-2352 issuer warning on every re-login; fixed an issue where filenames containing hidden text-direction or control characters displayed as different names in the Claude app, and such files are now outright rejected from being sent. This change targets attacks that use bidirectional text characters for filename spoofing.

Bidirectional text (bidi) control characters are format control characters introduced by the Unicode standard to support right-to-left languages such as Arabic and Hebrew, for example RLO (Right-to-Left Override) and isolation characters like LRI/RLI. They don't display as visible glyphs but can change the rendering order of subsequent characters.

This feature is abused for filename spoofing: attackers construct filenames whose actual extension or content doesn't match their displayed appearance, for example making exe or script suffixes look like harmless text files in the interface, tricking users into opening them. Because terminals and graphical interfaces handle bidi characters differently, the same filename may appear as different names in different places. Mitigations typically include: detecting and rejecting filenames containing bidi control characters, escaping these characters when displaying, or uniformly presenting them in logical order rather than visual order. SEP-2352 is the section of the MCP specification related to validating the issuer of OAuth authorization servers, used to prevent tokens from being misused by an incorrect issuer.

Developer Experience and Stability Improvements

Fixes for Numerous Session and Background Agent Issues

The release notes list dozens of fixes covering background subagents, working trees, Windows paths, network paths (UNC shares, WSL folders, /net mounts), and other scenarios. For example, an issue where NotebookEdit on network paths would delete or overwrite the notebook's first cell when no cell was specified has been fixed; an issue where Edit with an empty old_string replaced the entire file has also been fixed. These are high-risk defects that could easily cause data loss.

Windows Platform-Specific Optimizations

Windows users received several startup speed improvements: by not launching helper processes to find programs in PATH; for standard Git for Windows installations, no longer checking which git.exe to run on every startup; skipping relative paths, UNC paths, and network share links when looking up startup programs. Additionally, fixed an issue where the FileChanged hook stopped working after the first shell command when the working directory used a lowercase drive letter.

Performance and Memory

Fixed high memory usage caused by repeatedly reading single lines from large files during long sessions; improved startup speed by loading trusted TLS certificates faster at startup; claude install and installation scripts now complete 2 to 4 seconds faster.

Practical Impact and Recommendations for Developers

For teams heavily reliant on Claude Code, there are several actions worth prioritizing in this update.

First, check whether your organization uses remote MCP servers and relies on OAuth authentication, and after upgrading, re-examine the MCP server's redirect configuration to confirm the fix is in effect. Second, review permission rules based on cp/mv directory writes to ensure deny rules cover target files as expected. Third, if you use Fable models on Team or Enterprise plans, note that the effective conditions for model migration depend on organizational policy; if necessary, temporarily pin the old version via /model claude-fable-5-1.

The release notes also mention that modifications written by mods can be enabled without asking in auto and bypass modes, even if allowUnsandboxedCommands: false or allowManagedDomainsOnly is set; mods' own tool calls ($.tool.call, $.mcp.call) also no longer trigger permission prompts, though deny rules and organizational policies still apply. This change alters the permission model for mods, so teams with custom permission policies should review them as well.

Overall, v2.1.321 is an update centered on model upgrades and security hardening, with a high density of fixes, indicating that previous versions had accumulated a fair number of issues in edge scenarios such as network paths, permission boundaries, and background agents. For production users, this is a version worth evaluating and upgrading to as soon as possible.

One-line Summary

Claude Code v2.1.321 upgrades the default model to Fable 5.2 and focuses on fixing security vulnerabilities such as the MCP OAuth credential leak.

Paragraph Summary

Claude Code released version v2.1.321, with the core change being that Claude Fable 5.2 (claude-fable-5-2) becomes the default model in the Fable series, supporting a 1M context window, priced at $8 per million input tokens, $40 per million output tokens, and $0.20 per million cache reads, positioned against frontier models; migration from the old version for Team/Enterprise users requires organizational permission, and users can switch back with /model claude-fable-5-1. On the security side, it fixes the MCP OAuth leak vulnerability where refresh tokens and other secrets were sent to other hosts during server redirects, and patches permission boundary issues such as read-only Bash commands escaping the sandbox, Bash permission checks judging writes from the wrong directory, and cp/mv target files not being subject to deny rules; it also rejects filenames containing bidirectional text control characters. Additionally, it fixes numerous stability defects involving network paths, background subagents, and Windows startup performance.

#Claude Code#v2.1.321#Fable 5.2#MCP OAuth#security fix#sandbox
Share:

Related articles