• Home
  • Artificial Intelligence
  • Source Code Leak Reveals Claude Code Detects Profanity in User Prompts, Then Silently Logs It to a Database, Analyses Shows
Source Code Leak Reveals Claude Code Detects Profanity in User Prompts, Then Silently Logs It to a Database, Analyses Shows

Source Code Leak Reveals Claude Code Detects Profanity in User Prompts, Then Silently Logs It to a Database, Analyses Shows

Anthropic confirmed that the full source code of its Claude Code command-line interface was inadvertently exposed through a source map file included in an official npm package, the company said on April 1, 2026.

The exposure occurred in version 2.1.88 of the package @anthropic-ai/claude-code, released on March 31, 2026. It involved a 60-megabyte file named cli.js.map that contained unminified TypeScript code spanning about 1,900 files and more than 512,000 lines, according to technical analyses of the leaked material.

Security researcher Chaofan Shou first identified the issue, which stemmed from a packaging error involving the Bun bundler that failed to exclude the map file, the analyses said. Anthropic described the incident as a release packaging issue caused by human error, not a security breach. The company pulled the affected package version shortly after the discovery.

Analyses of the leaked code showed it contained internal features such as a regex pattern in a file called userPromptKeywords.ts designed to detect profanity and expressions of frustration in user prompts for telemetry logging. The code also included provisions for an Undercover Mode that allows Anthropic employees to contribute to open-source repositories without AI attribution, the analyses said.

The code was mirrored on public GitHub repositories shortly after the leak became known, including one maintained by instructkr and another by Alex Kim. A discussion thread on Reddit’s r/ClaudeAI forum first drew widespread attention to the exposure on March 31, 2026.

Prediction market platform Polymarket referenced the leak in the post on X above, highlighting the profanity detection and telemetry elements as part of the revealed internals.

Anthropic has not commented further on the specific features disclosed in the code. No customer data or credentials were exposed in the incident, according to the company’s statement.

The leak has prompted discussions among developers and AI researchers about software packaging practices for tools that incorporate large language models. It also raised questions about transparency in how AI companies handle internal telemetry and operational safeguards in publicly distributed codebases.

Mainstream outlets including Ars Technica, The Register and VentureBeat reported on the episode, citing the same technical breakdowns and Anthropic’s confirmation. No legal or regulatory actions related to the leak have been reported as of April 1, 2026.

Releated Posts

Caterpillar Armored Bulldozer Sale to Israel Advances After Senate Rejects Block

The U.S. Senate rejected a resolution that would have blocked a proposed $295 million sale of Caterpillar armored…

ByByZane Clark Apr 17, 2026

Ilhan Omar Says Republicans Are Trying to Sell Out Our Most Pristine Waters to a Foreign Mining Corporation

Rep. Ilhan Omar (D-MN) criticized a Senate vote to overturn federal protections against mining in the watershed of…

ByByZane Clark Apr 16, 2026

Three Men Arrested in $1 Million Stolen Lego Cargo Theft in California

Deputies from the Kern County Sheriff’s Office Mojave Substation responded to a call about suspicious vehicles on April…

ByByZane Clark Apr 13, 2026