November 6, 2026

Claude Code Was Leaking Your Email to Every Website It Visited

If you have been using Claude Code, Anthropic's command-line coding assistant, there is a chance your email address has been handed to every website the tool visited on your behalf. A bug report filed on GitHub reveals that Claude Code was embedding the user's email address in the User-Agent HTTP header during web searches, exposing it to arbitrary third-party servers without consent [1].

The issue was discovered by a developer who noticed a sudden flood of scam emails after using Claude Code for web research tasks. The connection became clear: every HTTP request Claude Code made included a User-Agent string containing the account holder's email address, visible to any server that received the request [2].

What was exposed

The User-Agent header is a standard HTTP field that browsers and HTTP clients send with every request. Servers use it to identify the client software. Normally it contains something like Mozilla/5.0 followed by browser and operating system details. Claude Code was apparently including the user's Anthropic account email in this header, which means every web server that received a request could read it.

This is not a theoretical leak. Every website Claude Code visited during a web search, every documentation page it fetched, every API endpoint it queried, received the user's email address. For a developer using Claude Code throughout the workday, that could mean hundreds of websites per session [3].

Why this matters

Email addresses in User-Agent headers are a goldmine for spammers, scrapers, and anyone running analytics on incoming traffic. Server logs are routinely aggregated, sold, and mined. Once an email hits a server log, it can be harvested, correlated with other data, and added to scam mailing lists within hours.

The bug reporter stated they were receiving dozens of scam emails per day as a direct result. They also noted they were migrating their company to an alternative provider, citing a loss of faith in Anthropic's ability to protect user privacy [4].

The response

The Hacker News thread racked up over 1'180 points and 374 comments within 12 hours, making it one of the most upvoted stories of the day. Commenters were broadly critical of Anthropic, with many pointing out that putting identifiable user data in a User-Agent string is a basic privacy mistake that should have been caught in code review [5].

Some commenters noted that User-Agent strings have a long history of carrying unexpected payloads, but embedding an email address is a particularly bad variant. Others compared it to the kind of telemetry that companies claim is anonymous but turns out to be trivially linkable to individuals.

The broader problem

This incident highlights a recurring issue with AI coding tools: they make HTTP requests on behalf of users, but the privacy implications of those requests are often an afterthought. When a CLI tool fetches a documentation page or searches the web, it carries the user's identity with it. If the tool does not strip identifying information from its HTTP headers, the user is effectively broadcasting their identity to every server they touch.

For tools that are increasingly used in sensitive contexts, from proprietary codebases to internal documentation, this is a serious design failure. The bug reporter's suggestion is straightforward: remove the email from the User-Agent entirely, not as an opt-in or opt-out setting, but as a hard removal [6].

What you should do

If you have used Claude Code for web searches, assume your email address has been exposed to the websites it visited. Watch for increased spam. Consider whether the email address on your Anthropic account is one you use for other sensitive communications. And if you are building HTTP clients that run on behalf of users, strip identifying information from your headers before the request leaves the machine [7].

Sources

  1. GitHub issue: "Bug Report: Privacy violation in User-Agent header" (anthropics/claude-code#107757). github.com, November 6, 2026. ^
  2. The bug report describes the User-Agent header containing the user's Anthropic account email, visible to all third-party servers receiving requests. github.com. ^
  3. Claude Code version 2.1.318 on macOS was identified in the bug report as the affected version. github.com. ^
  4. Bug reporter stated: "I am migrating my company to Pi with OpenRouter since I have no faith in anthropic preserving my privacy." github.com. ^
  5. Hacker News discussion: "Claude Code sends your email address to websites" with 1'180 points and 374 comments. news.ycombinator.com, November 6, 2026. ^
  6. The reporter explicitly called for removal, not an opt-out: "This should not be a setting with opt-out or opt-in behavior, it needs to be removed from the harness entirely." github.com. ^
  7. HTTP User-Agent header specification (RFC 7231, Section 5.5.3) describes the field as containing information about the user agent, not the user. datatracker.ietf.org. ^