← Hacker News

Claude Code is leaking real email address as a User-Agent string in curl command

Hacker News · matada_ · August 11, 2026

Detailed Analysis

A privacy issue has surfaced in Claude Code, Anthropic's command-line coding assistant, in which the tool inserts a user's real email address into the User-Agent string when making outbound curl requests during coding sessions. Rather than using an anonymized identifier, session token, or generic client label—standard practice for HTTP User-Agent headers—Claude Code appears to embed personally identifiable information tied to the authenticated account. This means that any server, proxy, logging system, or network intermediary that receives requests generated by Claude Code during a coding session could capture and store a developer's actual email address, often without their knowledge or consent.

The significance of this issue lies in how it violates a long-standing norm in software engineering around minimizing the exposure of personal data in technical metadata. User-Agent strings are typically logged extensively across the internet—by web servers, CDNs, API gateways, security monitoring tools, and third-party analytics platforms—often for extended periods and without special handling for sensitive content. When a coding assistant that developers may use to interact with external APIs, test endpoints, or scaffold applications silently leaks an email address through this channel, it creates a durable and potentially widespread trail of personal information across systems the user never intended to share it with. For enterprise users, this is particularly concerning: many organizations have strict data governance policies, and an AI tool inadvertently broadcasting employee email addresses to third-party servers could constitute a compliance violation or expose staff to phishing and targeted attacks.

This incident fits into a broader pattern of scrutiny facing AI coding tools as they become more deeply integrated into developer workflows. Tools like Claude Code, GitHub Copilot, and Cursor operate with significant privileges—executing shell commands, making network requests, and accessing local files—which magnifies the consequences of any privacy or security oversight. As agentic AI systems increasingly perform actions autonomously on a user's behalf, including making external network calls, the attack surface for inadvertent data leakage grows substantially. Unlike a chatbot that simply generates text, an agentic coding tool that executes real commands can leave tangible traces across the internet, making this class of bug more consequential than a simple UI glitch.

For Anthropic, the episode underscores the heightened bar that AI companies face as trust and safety expectations extend beyond model outputs to the surrounding tooling and infrastructure. Anthropic has positioned itself as a safety-focused AI lab, and issues like this—however unintentional—invite comparison against that stated mission. The likely resolution involves anonymizing or removing personal identifiers from default telemetry and network headers, giving users explicit control over what metadata is transmitted, and auditing other parts of the Claude Code pipeline for similar leaks. More broadly, the episode is a reminder that as AI agents gain more autonomy to act on the open internet, engineering teams must apply the same rigor to privacy-by-design principles that has historically governed browsers, operating systems, and enterprise software, since the cost of oversight in agentic systems is no longer confined to a single application but can ripple across every server the agent touches.

Read original article →