Ransomware & Malware

Hugging Face Malware Attack: AI Supply Chain Danger

Everyone thought Hugging Face was a safe haven for AI innovation. Think again. A recent discovery of a sophisticated infostealer malware disguised as a legitimate OpenAI tool shatters that illusion and blows the AI supply chain lid wide open.

Abstract digital network graphic with red warning indicators

Key Takeaways

  • A sophisticated infostealer malware was found hidden in a popular Hugging Face repository, highlighting AI supply chain risks.
  • The malicious repo used typosquatting to impersonate an OpenAI tool and artificially inflated its download and like counts to appear legitimate.
  • The malware employed advanced techniques to evade detection by security software and analysis tools.
  • Victims are advised to treat compromised systems as fully compromised and rotate all stored credentials and session data immediately.

So, the big worry everyone’s been whispering about in the AI circuit – the supply chain vulnerability – just landed with a thud. We’re talking about Hugging Face, the darling of the open-source AI community, that place where researchers and developers dump their cool new models and code. The expectation? A collaborative, secure ecosystem. The reality? A shiny new vector for crooks to plant malware, disguised as something useful.

And here’s the kicker: this isn’t some obscure, barely-downloaded script. This thing, tucked away in a repository called Open-OSS/privacy-filter, managed to rack up over 244,000 downloads and 667 likes in under 18 hours. Funny how those numbers just happened to look so good, isn’t it? HiddenLayer, the security outfit that sniffed it out, is pretty clear: those numbers were “almost certainly artificially inflated.” Classic bait and switch, Silicon Valley style.

Typosquatting: The Oldest Trick in the Book, Now with AI Sparkle

What’s particularly galling here is the sheer audacity. The malicious repo wasn’t just similar to OpenAI’s legitimate privacy-filter; it was a near-perfect copy. They even lifted the model card. This isn’t some novel exploit; it’s good ol’ fashioned typosquatting, a tactic as old as domain names themselves. But now, instead of a dodgy looking website, you’re downloading what you think is a vetted AI tool. And that, my friends, is where the AI angle makes it particularly insidious. People are less suspicious because it’s ostensibly part of the AI ecosystem they trust.

The attack itself is a six-stage ballet of deception. You clone the repo, you run a script – start.bat for Windows folks, python loader.py for the rest of us – and BAM. A base64-encoded string unwraps itself, dropping a Rust-based infostealer. Rust, by the way, is the current darling language for performance and safety. Funny how it’s also being used to build sophisticated malware.

Evading Detection: A Digital Ghost in the Machine

This isn’t your grandpa’s virus. This malware is built to be a ghost. It hides its API calls to confuse static analysis tools, it actively checks if it’s being debugged or run in a sandbox (because who wants to be caught?), and it even tries to sniff out virtual machines. And the cherry on top? It attempts to disable Antimalware Scan Interface (AMSI) and Event Tracing for Windows (ETW) – the digital equivalent of cutting the alarm wires and disabling the security cameras. All this to pilfer your browser passwords, session cookies, Discord tokens, crypto wallets, Telegram sessions… you name it. Essentially, everything that makes your digital life tick.

“Because the payload is a credential-harvesting infostealer, do not log into anything from the affected host before wiping it,” the vendor explained.

Look, if you downloaded this thing and ran it, your machine is toast. Don’t bother trying to salvage anything. The advice from HiddenLayer is grim but necessary: wipe the machine clean. And then, the truly tedious part – rotate every single credential you’ve ever stored on that machine. Passwords, session cookies, OAuth tokens, SSH keys, FTP creds… even cloud provider tokens. And don’t forget session cookies; they can bypass multi-factor authentication even if you change your password.

Who’s Actually Making Money Here?

This brings us back to the real question, doesn’t it? Who benefits from this mess? The cybercriminals, obviously. Infostealers are a massive industry. KELA’s data from last month points to at least 347 million credentials purloined by these tools. That’s not just a number; that’s millions of people’s identities, finances, and private communications up for grabs. Hugging Face, on the other hand, is left scrambling to clean up the mess and explain why its platform became a distribution channel for malware. OpenAI gets a black eye by association. The security vendors like HiddenLayer get to showcase their wares. It’s the same old song and dance: crooks profit, users suffer, and the platforms scramble to catch up.

This incident is a stark reminder that the AI revolution isn’t just about groundbreaking algorithms; it’s also about the messy, often overlooked, infrastructure that supports it. And right now, that infrastructure looks a lot like a minefield.


🧬 Related Insights

Wei Chen
Written by

Technical security analyst. Specialises in malware reverse engineering, APT campaigns, and incident response.

Worth sharing?

Get the best Cybersecurity stories of the week in your inbox — no noise, no spam.

Originally reported by InfoSecurity Magazine

Stay in the loop

The week's most important stories from Threat Digest, delivered once a week.