Email leak stopgap in Claude Code checks only shell calls

On November 7, Claude Code’s npm stable channel was still serving 2.1.311. That build hands the model the signed-in account’s email and runs no check on what the model does with it. A day earlier, Lydia Hallie of the Claude Code team had said a release expected early next week would take the email out of the model’s context. Below 2.1.317, nothing keeps the address out of the User-Agent headers the model writes. From 2.1.317, a built-in mod called cc-plugin-privacy refuses Bash, PowerShell and Monitor calls that hold the address next to a User-Agent, while web tools, MCP tools and scripts written to disk get through.
A user reported on November 5 that Claude Code had put their address in the User-Agent of web requests without asking, and said they now get scam email every day. Theainewsreport read the mod’s source the next day and published a scan for past sessions and a hook that blocks the address. We ran the mod’s check, the scan and the hook. The scan’s hit count turned out not to be a count of leaks.
Before the fix ships
Run claude --version and update if it shows anything below 2.1.317. That includes installs pinned to the stable tag. On November 7 the latest and next tags both pointed at 2.1.319. It was published at 00:58 UTC on November 6, hours before Hallie’s comment, which suggests it is not the promised fix.
Then open /plugins and confirm cc-plugin-privacy is installed and enabled. One user on 2.1.318, francescor, could not find it there. Users on macOS and Windows also posted tests on 2.1.317 and 2.1.318 where the mod showed as loaded but still let a curl -A call carrying their own address run.
The explainer’s PreToolUse hook, which the outlet itself calls deliberately blunt, covers more. It refuses any Bash, PowerShell, Monitor, Write, Edit or WebFetch call whose input holds the account address or the global git email, and any call that reads git’s user.email. The hooks docs add that from v2.1.314 a Bash matcher also fires on commands started through Monitor. The hook does not see MCP tools or values a script fetches at run time.
Why the model wrote the address
Hallie gave this account: users had reported Claude making up names in places like @author tags, so Claude Code began giving the model the account email. When Claude later wrote a curl call or a script on its own, it sometimes used that address as the contact in the User-Agent. Wikimedia’s policy and the SEC’s EDGAR guidance both ask scripted clients to put a contact in that header. That matches an October report in which a user said Claude had sent their email out more than ten times that month, a count that came from Claude itself, with one request going to the SEC.
One commenter scanned his transcripts and reported 53 such calls across 8 sessions. Almost all came from subagents writing their own curl -A lines. Another commenter found the model also makes up a product name for the header based on the project it is working on.
The leak was already on file in July. An issue filed on July 17 against v2.1.212 described the email being sent in the User-Agent without confirmation. The repository closed it on September 11 as “not planned”, with a stale label. A second issue, filed July 25, quoted the v2.1.220 code that writes The user's email address is ${n}. into the system prompt, and that one is still open. The mod shipped in 2.1.317 on November 2. Late on November 5, Anthropic contributor mpoteat wrote on Hacker News: “We were initially aware of this a few days ago when this problem started popping off on Reddit.”
What the mod lets through
The mod’s README calls it a courtesy rather than a boundary. It checks only Bash, PowerShell and Monitor calls. It refuses one only when the input holds the address and names a User-Agent, either in words or with a flag such as curl -A, wget -U or PowerShell’s -UserAgent. It does not check WebFetch, WebSearch or MCP tools. It also misses the address in a URL, a request body, curl -u or another header, a value read at run time such as $(git config user.email), and a script the model writes with Write and then runs. Hallie acknowledged the script gap herself, saying the mod “still doesn’t prevent all cases, like when Claude writes a script and runs on its own.”
The coming fix removes the address the model has been pasting. The model can still read git config or a dotfile, though, and one commenter says that is how Claude got his address.
Our analysis
What we checked
On November 7 we ran the mod’s published source, from its November 6 commit, unmodified in Node 22 against a set of test commands. We also ran the explainer’s scan on 11 sample session files and its hook on test calls.
The explainer says its scan lists sessions where a single tool call holds the address and a User-Agent, and treats its matches on a real install as proof that the risk is real. On our samples it flagged 6 files, and only one held a real leak. It tests whole transcript lines, which can carry several tool calls plus text, and it counts any dash-a flag. It also missed two real leak shapes. In our run the published mod refused both commands that users said got past it, so the problem probably lies outside its matching code. That was one run on a copy of the source; we did not test the shipped binary.
- False scan hits: the address in assistant text next to
ls -a,git add -Awith--author,grep -A 3on the address, the address and a User-Agent in two separate tool calls, and a WebFetch prompt. Misses:curl -A"bot <email>"with no space before the quote, and a%40-encoded address. - The mod lets through “User Agent” written with a space, an address percent-encoded twice, lower-case
curl -a, and every call when the session holds no email. It refuses agit add -Acommit whose message holds the address and merely mentions curl. - Hallie’s full description says the mod “asks you before Claude runs a web tool call or a curl-style command containing your email”. The explainer quoted only the web-tool half. In the source, the mod refuses without asking.
- The hook misses the
%40-encoded address, which the mod catches, and an address split by shell quotes, which the mod refuses. It also blocksgit config --global user.emailwith a noreply address whenever Claude runs it, even though that is the explainer’s own advice. Run that command yourself.
Up next
Anthropic IPO talk slides to $1.2-1.3T from $1.5T
A “punishing post-election selloff” has prospective Anthropic IPO buyers talking $1.2-1.3 trillion, per Bloomberg, and some are weighing as little as $1.1 trillion. Would you buy into an AI lab’s IPO right after a selloff like that, or wait?
Related stories
- Claude Code sends file hashes to Anthropic even on DeepSeek
- User says Claude Code sent their email out 10+ times
- Claude Code ships mods, the same tool behind its /diff
- Apiiro finds Claude Code secrets in 1,122 GitHub files
- Claude Code agent sat on a Pentagon network for two months
- Backdoored Claude Code builds were limited to Cursor
Comments
No comments yet. Be the first.
Join the conversation
Sign in to leave a comment. It appears after moderation.

