Hintsphere
0%

AI Security Researchers Find Claude Code Leaking Secrets on GitHub

AI security researchers found thousands of secrets, including passwords and tokens, leaked via Claude Code settings files on public GitHub instances due to a handling oversight.

Hintsphere Staff 2 min read
AI Security Researchers Find Claude Code Leaking Secrets on GitHub

Claude Code Security Flaw Discovered

AI security researchers at Apiiro have identified that Claude Code is leaking sensitive information on public GitHub instances due to a partial oversight in how its settings files are handled.

The Scale of the Leak

The researchers discovered thousands of secrets embedded within Claude Code settings files found in GitHub repositories. These secrets included database passwords, API tokens, and root logins.

How the Leak Occurs

The vulnerability stems from the way Claude Code manages user approval for automated shell commands.

  • When a user selects the "Yes, and don't ask again" option to approve running a command, that choice is stored as part of a rule in the local file, ".claude/settings.local.json" on the user's computer.
  • This rule is sometimes coded as a pattern, but the command itself is often written to that settings file exactly as is.
  • This practice allows sensitive information to be embedded directly within the settings file.

Security Context and Mitigation

The security implications depend on the file location. This issue is not considered a significant security problem if the settings file remains on the user's local machine, assuming that machine is not compromised.

Anthropic has taken steps to mitigate this risk. They note in its Claude Code documentation that this particular settings file is added to the developer's global .gitignore list, which generally prevents it from being shared publicly.

Source

arstechnica.com

This story summarizes reporting from the publisher. Read the full piece at the source.

Read the full story

Written by

Hintsphere Staff

Writes for the Hintsphere desk.

Keep reading

View category