hugging-facesupply-chain-attackinfostealeropenairust-malware

Fake OpenAI Repo on Hugging Face Delivered Rust Infostealer to 244,000 Developers

A typosquatted OpenAI repository reaching #1 on Hugging Face pushed malware to 244K downloads. Here's what developers need to do now.

Diego Diaz
8 min

What Happened

A malicious repository impersonating OpenAI's legitimate Privacy Filter model reached the #1 trending position on Hugging Face and accumulated 244,000 downloads before the platform took it down. The repository, named Open-OSS/privacy-filter, typosquatted OpenAI's real project, copied its model card nearly verbatim, and shipped a loader.py file that fetches and executes infostealer malware on Windows machines. Researchers at HiddenLayer discovered the campaign after noticing the repo trending, and multiple security outlets confirmed the findings within hours.

Technical Analysis

The attack uses a multi-stage chain designed to evade static scanning and behavioral detection:

  1. Stage 1 — The Bait: The repo presents itself as OpenAI's Privacy Filter with a cloned model card, gaining organic trust from the ML community. Users clone and run start.bat or python loader.py as instructed in the README.
  2. Stage 2 — Dead-Drop Resolver: loader.py does not contain the payload directly. Instead, it queries a public JSON "Keeper" dead-drop, which returns the URL of the next stage. This decouples the malware from the repository, allowing operators to hot-swap payloads without modifying the repo — evading Hugging Face's static scanning.
  3. Stage 3 — PowerShell Downloader: The resolver returns a PowerShell command executed as powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden with CREATE_NO_WINDOW flags, making execution fully silent. It downloads a batch script from api.eth-fastscan[.]org.
  4. Stage 4 — Rust Infostealer: The final payload is a compiled Rust binary. It targets Chromium and Gecko browser data (cookies, saved passwords, encryption keys, session tokens), Discord tokens and master keys, cryptocurrency wallets and browser extensions, SSH/FTP/VPN credentials including FileZilla configs, wallet seed files, and multi-monitor screenshots.
  5. Stage 5 — Exfiltration: Collected data is packaged into a JSON payload, gzip-compressed, and exfiltrated via HTTP POST with a Bearer authorization header to recargapopular[.]com.

The Rust binary also includes anti-analysis checks: it detects debuggers, sandboxes, and virtual machines, disables AMSI and ETW for behavioral evasion, and uses an ephemeral persistence model via a scheduled task that self-destructs before reboot, leaving almost no forensic artifact (GRID THE GREY).

Who's Affected

The direct target is AI/ML practitioners and developers who downloaded and executed the repo on Windows machines. With 244,000 downloads before takedown, the potential blast radius is significant:

  • Browser sessions — Session cookies and OAuth tokens can be used to bypass MFA on email, cloud, and corporate SSO portals, even if passwords were not saved.
  • Developer credentials — SSH keys, FTP credentials (including FileZilla), and cloud provider tokens were explicitly targeted, meaning CI/CD pipelines and production infrastructure could be at risk.
  • Cryptocurrency wallets — Seed phrases, keystores, and wallet extension data were harvested. Any funds in affected wallets should be considered compromised.
  • Discord — Tokens and master keys were stolen, enabling account takeover and potential lateral movement through developer communities.

The attack is notable for its supply chain angle: Hugging Face is the de facto distribution platform for AI models, with millions of downloads daily. A malicious repo reaching #1 trending means it was surfaced to the entire platform's active user base (BleepingComputer).

How to Protect Yourself

If you interacted with Open-OSS/privacy-filter or any Hugging Face repo you don't fully trust, take these steps immediately:

  1. Assume compromise if you executed anything. Running start.bat or python loader.py on Windows means the full chain likely executed. Treat the system as fully compromised.
  2. Rotate all credentials. Change passwords for email, cloud providers, GitHub/GitLab, VPN, and any service where session cookies may have been stolen. Revoke OAuth tokens and API keys.
  3. Move cryptocurrency funds. Transfer all wallet funds to a new wallet generated on a clean device. Assume seed phrases and keystores are compromised.
  4. Invalidate Discord sessions. Reset your password and revoke all authorized apps. Discord tokens were explicitly targeted.
  5. Block IOCs at the network edge. Block recargapopular[.]com and api.eth-fastscan[.]org at your firewall/proxy. Hunt historically for any connections to these domains.
  6. Audit your Hugging Face usage. Review any repos cloned in the past 30 days. Verify the publisher identity before executing any setup scripts.
  7. Never run untrusted setup scripts. A model repository should contain weights, configs, and documentation — not .bat files or loader.py scripts that fetch remote code. If a repo asks you to execute something, that's a red flag.

The Sable Angle

This attack is a textbook example of why offensive security research matters. The operators behind Open-OSS/privacy-filter used the same techniques red teams deploy daily: dead-drop resolvers, living-off-the-land binaries (PowerShell), compiled payloads for evasion, and ephemeral persistence. Understanding how these chains work is the first step to breaking them.

At Sable, our offensive engineers run supply chain compromise simulations as part of engagements — testing whether your CI/CD pipeline, developer workstations, and model registries can detect and block exactly this kind of attack. If your team ships AI/ML code or consumes models from public registries, this isn't theoretical. It's Tuesday. Check our research archive for more on supply chain threats, and reach out if you want to stress-test your defenses before the next 244,000-download surprise.