Skip to content
GitHub Security Advisories·Indexed by this site · Originally published· Event →SelectedAttention40

Claude Code fixes vulnerability where stored API key takes precedence over enterprise login causing managed policies not to take effect

Managed Settings Not Applied When a Stored API Key Was Preferred Over Enterprise Sign-In

AI summary

Anthropic disclosed a vulnerability in Claude Code: when an API key stored by Claude Code (e.g., from a previous /login or written directly to configuration) takes precedence over a user's valid Claude Enterprise or Team login, fetching organization server-managed settings uses that key, even if the session is authenticated with an enterprise or team account. After the settings endpoint rejects the key, the session starts without organization server-managed policies (such as permission denial rules, model restrictions, and managed-only locking), or continues using old policies cached on the machine without receiving subsequent policy changes, while still running under the organization account. Triggering requires local access to the device holding the API key; the no-policy scenario also requires that managed settings were not previously cached; endpoint-managed (MDM or file) settings are not affected. Claude for Enterprise organizations are affected from version 2.0.68, and Claude for Work (Team) organizations from version 2.1.38. The vendor stated that the issue has been fixed in Claude Code 2.1.260.

Why it was selected

The announcement disclosed a vulnerability in Claude Code where a stored API key takes precedence over enterprise login and skips organization managed policies, and provided affected versions and the fixed version.

Read originalgithub.com