Ransomware & Malware

AI Repo on Hugging Face Pushed Infostealer Malware

Imagine walking into a cutting-edge AI lab, only to find it's a Trojan horse. That's precisely what happened on Hugging Face, a hub for AI innovation, when a malicious repository masqueraded as an official OpenAI tool.

A digital padlock superimposed over a computer screen displaying code and AI graphics.

Key Takeaways

  • A malicious Hugging Face repository impersonating OpenAI's Privacy Filter was discovered, reaching the platform's trending list.
  • The repository distributed powerful Rust-based infostealer malware (Sefirah) targeting sensitive data like browser credentials, crypto wallets, and SSH keys.
  • The malware employed advanced anti-analysis techniques to evade detection and exfiltrated stolen data to a remote command-and-control server.
  • Users who downloaded from the compromised repository are advised to perform a full system reimaging and rotate all credentials.

And there it was, cresting the wave of innovation, a shining beacon of AI progress – or so it seemed. This wasn’t just some random code drop; this was a sophisticated piece of digital trickery, wearing the esteemed uniform of OpenAI, and it had climbed to the very top of Hugging Face’s trending list.

A deceptive digital wolf in sheep’s clothing, really. This repository, shamelessly named Open-OSS/privacy-filter, was no benevolent AI project. It was a meticulously crafted trap, designed to ensnare unsuspecting users eager for the latest in AI privacy tools.

The Illusion of Trust

Look, Hugging Face is where the AI community congregates. It’s the digital equivalent of a bustling town square, a place for sharing, collaborating, and showcasing the future. Developers and researchers flock there to exchange models, datasets, and the very code that powers our burgeoning artificial intelligence. Models are the engines of AI, packed with the weights, configurations, and logic that make them tick. So when something bearing the OpenAI name hits the trending list, people pay attention. They trust it. And that, my friends, is precisely the vulnerability these cybercriminals exploited.

This whole sordid affair came to light thanks to the sharp eyes at HiddenLayer, a company dedicated to shielding AI and ML models from nefarious actors. They spotted this imposter on May 7th. The mimicry was almost artful – a near-perfect copy of OpenAI’s legitimate Privacy Filter model card, complete with a Python script, loader.py, that did far more than filter privacy. It was a loader, alright. A loader for something far more sinister.

The loader.py script itself was a masterclass in deception. It wove in fake AI-related code, a digital smokescreen to make it appear innocuous. But beneath that veneer? It disabled SSL verification – a major red flag right there – then decoded a base64-encoded URL that led to an external resource. From there, it fetched and executed a JSON payload. And that payload? A PowerShell command, designed to run invisibly, download a batch file (start.bat), escalate privileges, bypass Microsoft Defender exclusions by adding itself to them, and finally, execute the real payload: a nasty Rust-based infostealer known as Sefirah.

A Data Thief’s Dream

This isn’t just about pilfering a few passwords. Sefirah is an information-gathering powerhouse. It targets a breathtaking array of sensitive data on Windows machines: think browser cookies, saved passwords, encryption keys, session tokens from Chromium and Gecko browsers; Discord tokens, local databases, and master keys; cryptocurrency wallets and their browser extensions; SSH, FTP, and VPN credentials, including configurations for tools like FileZilla; even sensitive local files and crucial wallet seeds/keys. Oh, and it doesn’t stop there – it grabs system information and snaps multi-monitor screenshots. It’s like a digital burglar who not only steals your valuables but also photographs your entire house.

Once it has its grubby digital hands on all this juicy information, it compresses it and exfiltrates it to a command-and-control server at recargapopular[.]com. HiddenLayer also pointed out the malware’s sophisticated anti-analysis features – it actively checks for virtual machines, sandboxes, debuggers, and other analysis tools, all to make sure it can’t be easily dissected and understood. It’s a ghost in the machine, actively trying to hide from those who would expose it.

The Scale of Deception

Now, the exact number of victims remains murky. HiddenLayer suspects that the 244,000 downloads might have been artificially inflated, and many of the 667 accounts that “liked” the malicious repository were likely auto-generated. That’s the thing about these massive platforms – they can be gamed by botnets and coordinated campaigns. But even if the victim count is lower than the download numbers suggest, the potential for damage is astronomical.

This wasn’t an isolated incident. Digging deeper, HiddenLayer researchers found that the same malicious loader infrastructure was used in other repositories. They even noticed links to a previous npm typosquatting campaign that was pushing an implant called WinOS 4.0. It paints a picture of a persistent threat actor with a multi-pronged approach.

For anyone who downloaded from that malicious repository, the advice is stark: reimage your machine, rotate all stored credentials immediately, replace cryptocurrency wallets and seed phrases, and invalidate all browser sessions and tokens. This isn’t a situation where a quick scan will suffice. It’s a full system exorcism.

Is This Just the Beginning?

Hugging Face has security measures, sure. But this incident, sadly, isn’t the first time threat actors have abused the platform. It’s a constant arms race, a dance between innovation and exploitation. What this tells me, and what should alarm us all, is that the very platforms we rely on to build the future of AI are also becoming prime real estate for those who want to weaponize it. The AI revolution isn’t just about building smarter tools; it’s also about defending against the smarter attacks that are inevitably coming.

This campaign is a stark reminder that as AI becomes more integrated into our lives, the attack surface expands exponentially. The tools that promise to democratize AI can, in the wrong hands, democratize malware distribution too. It’s a chilling thought, but one we must confront if we’re to navigate this AI-powered future safely.

AI as a Platform Shift, Not Just a Tool

What’s truly fascinating here, and frankly, a little unnerving, is how this incident underscores the fundamental platform shift AI represents. We’re not just talking about new apps or slightly faster computers. We’re talking about a new substrate for computing, a new way to create and distribute — and now, weaponize — software. Think of it like the early days of the internet, when suddenly, information could spread globally, for better and for worse. AI is that, but on steroids, and with code that can reason and adapt. The ability to create seemingly legitimate, trending AI projects that secretly download and execute sophisticated malware is a terrifying evolution. It’s no longer just about exploiting known software vulnerabilities; it’s about exploiting the trust and excitement surrounding a paradigm shift itself.

FAQ

What is Hugging Face?

Hugging Face is a company and a popular open-source platform that hosts AI models, datasets, and tools, fostering collaboration and development within the machine learning community.

Will this malware affect my computer if I didn’t download it?

If you did not download any files from the specific malicious repository (Open-OSS/privacy-filter) on Hugging Face, your computer is likely safe from this particular infection. However, it’s always good practice to keep your antivirus software updated and be cautious about downloading from untrusted sources.

How can I protect myself from AI-related malware on platforms like Hugging Face?

Always verify the source of AI models and code. Look for official repositories, check the contributor’s reputation, and be wary of typosquatting or unusually high download counts for new projects. Researchers recommend reviewing code before execution and ensuring your security software is up-to-date.


🧬 Related Insights

Written by
Threat Digest Editorial Team

Curated insights, explainers, and analysis from the editorial team.

Worth sharing?

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

Originally reported by Bleeping Computer

Stay in the loop

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