Analysis of the Malware-Slop campaign involving a malicious npm package that targeted Anthropic Claude AI user directories, harvested local files, abused GitHub repositories for exfiltration, and leveraged deceptive package behavior to evade detection.
Researchers discovered a malicious npm package named mouse5212-super-formatter that masqueraded as a formatting utility while secretly stealing files from environments using Anthropic Claude AI. The malware specifically targeted the /mnt/user-data directory used by Claude to manage uploaded and generated files.
The package abused npm lifecycle hooks to automatically execute malicious code after installation, authenticate to GitHub using available credentials, create attacker-controlled repositories, and exfiltrate victim files. Researchers named the campaign Malware-Slop.
High
676+
npm
Claude Files
GitHub
Postinstall Hook
| Attribute | Details |
|---|---|
| Campaign Name | Malware-Slop |
| Malicious Package | mouse5212-super-formatter |
| Repository | npm Registry |
| Primary Target | Claude AI User Directory |
| Exfiltration Channel | GitHub Repository |
| Discovery Source | OX Security |
Threat actor publishes malicious npm package disguised as a formatter utility.
Victim installs package through npm dependency workflow.
Malicious code executes automatically during installation.
Package searches for GitHub tokens or uses hardcoded credentials.
Files from Claude AI directories are uploaded to attacker-controlled repositories.
The malware specifically searched for files stored in the Claude AI workspace located at /mnt/user-data. This directory commonly contains uploaded files, generated outputs, analysis results, and temporary working data.
Instead of using traditional command-and-control infrastructure, the malware leveraged GitHub repositories as a covert exfiltration channel. Files were uploaded into randomly generated folders to separate victim sessions.
The malware generated fake network diagnostic logs to disguise its real activity and make investigators believe the package only performed connectivity testing.
| Stage | Description |
|---|---|
| Installation | npm package installation |
| Execution | Postinstall hook triggers malware |
| Credential Discovery | Searches environment for GitHub token |
| Repository Creation | Creates attacker-controlled repository |
| File Collection | Harvests files from Claude workspace |
| Exfiltration | Uploads files to GitHub |
| Type | Indicator |
|---|---|
| Package Name | mouse5212-super-formatter |
| Target Directory | /mnt/user-data |
| Registry | npm |
| Exfiltration Method | GitHub Repository Upload |
| Execution Method | Postinstall Hook |
| Campaign | Malware-Slop |
| Tactic | Technique | ID |
|---|---|---|
| Initial Access | Supply Chain Compromise | T1195 |
| Execution | User Execution | T1204 |
| Collection | Data from Local System | T1005 |
| Credential Access | Credentials from Environment Variables | T1552.001 |
| Exfiltration | Exfiltration Over Web Services | T1567 |
| Defense Evasion | Masquerading | T1036 |