Cybersecurity

Hugging Face Model Hijacked Through Expired Domain

A popular Hugging Face AI model was hijacked via an expired domain, revealing a critical supply-chain vulnerability in open-source AI.

The recent hijack of the popular Kokoro text-to-speech model on Hugging Face is a concrete demonstration of a supply-chain risk we've all been ignoring. The attack, which used an expired domain to take over the publisher account, proves that the trust model for open-source AI is fundamentally fragile. Altering neural weights directly is a far stealthier attack than a malicious pickle file, and most teams are not prepared for it.

What's the real risk here? The researchers didn't just replace a file; they demonstrated the ability to modify the model's neural weights. This is the core of the problem. A compromised model could be altered to produce subtle, malicious outputs. Imagine a text-to-speech model that changes the audio for specific phrases or a code generation model that injects backdoors. Traditional malware scanners looking for executable payloads in `pickle` files would miss this entirely. The attack targets the model's logic, not the surrounding code.

This incident highlights a major gap in Hugging Face's platform security. There is no robust verification of publisher identity or ownership. If a publisher's account is compromised, they can push a malicious update to millions of downstream users without any warning. Trusting a model on the platform is currently an act of faith in the operational security of an often-anonymous developer.

The Verdict: Should you use it? Yes, but you can't treat Hugging Face like a trusted package manager. The convenience is undeniable, but this hijack proves the risk is real. You need to treat every third-party model as a potential vector. Pin your dependencies to specific model SHAs, audit the models you pull, and vet the organizations publishing them. Don't blindly pull `latest`. The open-source AI supply chain is not secure by default, and you are the last line of defense.

FAQ

What model was affected? The compromised model was `coqui-ai/TTS-v1`, also known as Kokoro. It's a popular text-to-speech model with millions of monthly downloads on the Hugging Face hub.

Isn't using safetensors supposed to prevent this? No. While `safetensors` prevents arbitrary code execution from malicious `pickle` files, it does not prevent an attacker from modifying the model's weights. A compromised publisher can still upload a "safe" tensor file with malicious weights that alter the model's behavior.

How can I protect my projects from this? Vet the publisher of any model you use. Pin your models to a specific commit hash instead of just the model name. For critical applications, consider retraining or fine-tuning your own models from a trusted base rather than using pre-trained models from unverified sources.