What's Happening?
Mitiga Labs has discovered a vulnerability in Claude Code, an agentic system, that allows attackers to steal OAuth tokens through a man-in-the-middle attack. This vulnerability enables attackers to redirect output, including tokens, to their own infrastructure
before it reaches the intended destination. The OAuth tokens, stored in plain text within the Claude Code configuration file, can be exploited by attackers to gain unauthorized access to connected tools. Mitiga reported the issue to Anthropic, the company behind Claude Code, but received a response indicating the issue was 'out of scope' as users have consented to potential outcomes. The vulnerability highlights the risks associated with agentic systems, which can expand the attack surface while operating invisibly.
Why It's Important?
The discovery of this vulnerability is significant as it exposes the potential for widespread unauthorized access to systems using Claude Code. OAuth tokens act as master keys, granting access to various tools and services, making their theft a critical security concern. Organizations using Claude Code must be vigilant in monitoring configuration changes and suspicious activity to mitigate risks. The lack of a prompt response from Anthropic underscores the challenges in addressing security vulnerabilities in agentic systems. This situation emphasizes the need for robust security measures and proactive monitoring to protect sensitive data and prevent unauthorized access.
What's Next?
Organizations using Claude Code should implement immediate security measures to monitor and protect OAuth tokens. This includes regular audits of configuration files and monitoring for unusual activity. Security teams should also consider alternative solutions or additional security layers to safeguard against potential attacks. The broader industry may see increased scrutiny on agentic systems and their security implications, prompting developers to enhance security protocols and address vulnerabilities proactively.












