Malware - Weaponizing Trust Signals with Claude Code Lures
Basically, a mistake exposed code that hackers used to spread malware quickly.
A packaging error in Anthropic's Claude Code exposed internal source code, leading to malware distribution. Threat actors exploited this to spread Vidar and GhostSocks. This incident highlights significant security risks for developers.
What Happened
On March 31, 2026, Anthropic's @anthropic-ai/claude-code npm package inadvertently exposed internal source code due to a packaging error. This incident revealed approximately 512,000 lines of TypeScript code when a source map file was mistakenly included in the release. Within just 24 hours, threat actors seized the opportunity, creating fake GitHub repositories to distribute Vidar and GhostSocks malware disguised as 'leaked' Claude Code downloads.
Who's Affected
The incident primarily impacts developers and organizations using or interested in Claude Code, as well as the broader community of software developers who might be lured by the fake repositories. Users looking for legitimate downloads may unknowingly download malicious software, putting their data and systems at risk.
What Data Was Exposed
The leaked source code included internal mechanisms and unreleased features, such as:
- KAIROS: An autonomous daemon mode for background operations.
- Undercover Mode: A module to prevent accidental information leaks.
- Dream System: A memory optimization engine.
- Model codenames: References to upcoming AI models. This exposure not only risks immediate malware distribution but also long-term vulnerabilities that could be exploited by attackers.
What You Should Do
Organizations should take proactive measures to mitigate risks from such incidents:
- Restrict installation paths for developer tools to trusted sources only.
- Implement monitoring for suspicious activity related to AI tools.
- Educate staff on the dangers of downloading software from unverified sources.
- Utilize advanced threat detection tools to identify and block indicators of compromise (IOCs) associated with this threat.
Attack Timeline
The attack unfolded rapidly:
- February 2026: Threat actors began using AI-themed malware lures.
- March 31, 2026: Source code leak due to a packaging error.
- April 1, 2026: Malware distribution under fake Claude Code downloads.
The Broader Campaign
This incident is part of a larger rotating lure operation that has been active since February 2026. Threat actors have impersonated over 25 software brands, using similar tactics to distribute malware through GitHub. The Claude Code leak merely provided a timely lure to further their campaign.
Conclusion
The Claude Code incident underscores the importance of human and organizational controls in cybersecurity. Security breaches can arise not only from software vulnerabilities but also from simple mistakes. Organizations must remain vigilant and proactive to safeguard against such threats.