Claude Code Exposes User Email Addresses in HTTP Headers
Claude Code was found disclosing user emails and project names in User-Agent headers, prompting Anthropic to release a privacy plugin.
TL;DR
- Claude Code leaks account email addresses and project details to external websites in HTTP User-Agent request headers [^1].
- Anthropic introduced a built-in privacy plugin in version 2.1.317 to block address leaks, but users note broader exposure risks remain [^1].
Background
AI coding assistants and command-line agents regularly execute web searches, call APIs, and run scripts on behalf of developers. When making network requests, HTTP clients include a User-Agent header to identify the software making the request. In developer tools, configuration settings or environment data—such as user identity, email addresses, and active repository details—can accidentally leak into outgoing traffic if the agent automatically formats HTTP headers with user metadata without explicit authorization.
What happened
On November 5, 2026, a bug report filed on the Claude Code GitHub repository highlighted a privacy vulnerability where the tool divulged account email addresses to third parties in HTTP User-Agent headers during web searches [^1]. The issue reporter, taylor-edwards, stated that this unauthorized data disclosure led to dozens of scam emails daily on macOS running version 2.1.318 [^1].
In response to the issue, Anthropic contributor poteat stated that Anthropic introduced a built-in plugin named cc-plugin-privacy in version 2.1.317 and later to block the behavior [^1]. The plugin is enabled by default and can be toggled via the /plugins command [^1].
Community members and analysts raised concerns about the fix [^1]. Commenters noted that AI agents typically send emails in User-Agent headers when target websites, such as SEC or Wikimedia endpoints, request contact information [^1]. Others pointed out that agents expose emails through other vectors like git configuration, referencing a prior issue from March 2026 [^1]. Additionally, commenter mkubenka observed that when Claude Code writes scripts or curl commands, it frequently attaches descriptive tokens—such as project, client, or task names—alongside user emails, leaving project contexts exposed even if email strings are filtered [^1].
Why it matters
Exposing user email addresses and project metadata through HTTP request headers transforms routine AI web queries into tracking and spam vectors [^1]. Web servers, analytics services, and malicious endpoints receiving these requests can collect, index, and monetize developer identity data alongside exact details about the software projects being built [^1].
Relying on a plugin to filter outbound email strings rather than fundamentally redesigning how the agent constructs HTTP requests leaves structural gaps [^1]. If an agent dynamically generates custom HTTP headers or reveals project identifiers without account emails, third parties can still link network traffic back to specific development activities [^1].
Practical example
Say Alex is using Claude Code to build an internal web application for a financial startup. While working on the project, Alex prompts the tool to search online documentation and query a public API [^1].
When executing the network requests, Claude Code constructs a curl command with a custom User-Agent header containing Alex's personal account email address and the specific project name [^1]. The third-party server logging the API requests receives Alex's email alongside the active project details [^1]. Scammers harvesting these server logs collect Alex's address, leading to an influx of targeted scam emails [^1].
To stop the email exposure, Anthropic enables the built-in cc-plugin-privacy plugin in version 2.1.317 and later [^1]. However, Alex must remain cautious, as custom header fields or project tokens generated by the tool may still transmit project context to external endpoints [^1].