BotBeat
...
← Back

> ▌

AnthropicAnthropic
POLICY & REGULATIONAnthropic2026-04-09

Claude Code's Local File Storage Exposes Sensitive Credentials and Session Data, Security Researcher Warns

Key Takeaways

  • ▸Claude Code stores memory and session artifacts in plaintext under ~/.claude/projects/ with world-readable permissions, exposing API keys, tokens, and secret references
  • ▸Session transcripts can be 30-41 MB in size and persist for months with no automatic deletion, creating a growing attack surface for compromised developer machines
  • ▸The files lack application-layer access control and audit trails, relying entirely on filesystem permissions and leaving no record of access or exfiltration attempts
Source:
Hacker Newshttps://serendb.com/blog/claude-code-local-memory-security-risk↗

Summary

Security researcher Taariq Lewis has identified significant security vulnerabilities in Claude Code's local memory storage system, revealing that the AI development tool stores sensitive information including API keys, authentication tokens, and session transcripts in plaintext files under ~/.claude/projects/ with weak access controls. The stored artifacts include memory markdown files and JSONL session histories that can be world-readable on multi-user systems, contain references to secret environment variables and bearer tokens, and persist indefinitely with no automatic pruning or retention policies. Lewis demonstrated that developers can verify these exposures themselves using basic file system commands, and notes that the lack of application-layer access control, audit trails, and fragmented portability of project directories compounds the security risk. The research highlights that same-user compromise—a common developer workstation attack vector—could easily lead to exfiltration of credentials and operational procedures stored in these unprotected local files.

  • Developers can verify the vulnerability themselves using command-line tools, and should immediately audit their local Claude projects for exposed credentials

Editorial Opinion

This disclosure exposes a critical gap between Claude's capabilities as a developer tool and its maturity as a security-conscious product. Storing credentials and operational procedures in plaintext files with no access control or retention policies is a fundamental security antipattern that puts every developer using Claude Code at risk. While SerenDB's proposed interception layer offers one mitigation path, Anthropic should treat this as an urgent priority—either by fundamentally redesigning how Claude stores sensitive project data or by providing out-of-the-box encryption, audit logging, and automatic credential redaction to safeguard developers' codebases and infrastructure.

CybersecurityAI Safety & AlignmentPrivacy & Data

More from Anthropic

AnthropicAnthropic
PRODUCT LAUNCH

Anthropic Prepares Mythos 1 for Public Release via Claude Code and Claude Security

2026-05-24
AnthropicAnthropic
FUNDING & BUSINESS

OpenAI Co-founder Andrej Karpathy Joins Anthropic

2026-05-24
AnthropicAnthropic
INDUSTRY REPORT

The Invisible Fabric of AI: Global Semiconductor Supply Chain Is Not a US-China War

2026-05-24

Comments

Suggested

AnthropicAnthropic
PRODUCT LAUNCH

Anthropic Prepares Mythos 1 for Public Release via Claude Code and Claude Security

2026-05-24
AgentGateAgentGate
OPEN SOURCE

AgentGate Launches Open-Source Authorization Layer for Enterprise AI Agents

2026-05-24
OpenAIOpenAI
RESEARCH

Major Study Reveals Disparities in AI Use and Cheating Among College Students

2026-05-24
← Back to news
© 2026 BotBeat
AboutPrivacy PolicyTerms of ServiceContact Us