Dragos seeded canary tokens into pickled weights, ONNX files, and companion config files, then watched them fire from what looked like staging and production ML infrastructure at real organizations. They argue internal ML platforms pull third-party model artifacts with roughly the same lack of scrutiny npm had in 2012, meaning the supply-chain attack surface is already being exploited in the wild.
By submitting the Dragos writeup to HN where it gained 79 points, kristianp amplifies the argument that model artifact exfiltration is a real, under-discussed threat worth developer attention. The submission framing treats the canary token findings as significant evidence of an exploited gap.
The editorial argues that two years of AI security discourse has chased 'sexy' failure modes like jailbreaks and alignment while pickle-based model loading quietly ships RCE primitives into production. It frames the asymmetry as damning: npm packages face typosquatting detection, Socket.dev analysis, and Sigstore provenance, while Hugging Face artifacts clear almost none of those bars.
Dragos, the ICS security vendor, ran a deceptively simple experiment: embed canary tokens — unique, trackable beacons that phone home when touched — inside AI model artifacts, then release them into the wild via the usual channels (Hugging Face mirrors, GitHub forks, torrent-style redistributions). The tokens fired. Not from curious researchers, but from environments that looked a lot like staging and production ML infrastructure inside real organizations.
The artifacts weren't exotic. They were pickled model weights, ONNX files, and the occasional Jupyter notebook — the same formats that flow through every ML team's build pipeline on a Tuesday afternoon. The tokens were seeded in metadata fields, inside serialized Python objects, and in companion `config.json` files. When a victim loaded the model with the standard `torch.load()` or `pickle.load()` incantation, the canary executed, phoned home, and Dragos got a timestamped record of the hit along with the external IP.
The writeup doesn't name victims, but it does name the pattern: internal ML platforms are pulling third-party model artifacts with roughly the same scrutiny a 2012 npm install applied to its dependency tree — which is to say, none.
The AI security conversation for the past two years has been dominated by prompt injection, jailbreaks, and model alignment — the sexy failure modes. This research is a reminder that the unsexy supply-chain problem is already being exploited, and the industry is years behind where traditional package ecosystems were when they figured out signing, SBOMs, and provenance.
Consider the asymmetry. A malicious npm package in 2024 has to clear several hurdles: typosquatting detection, Socket.dev-style static analysis, GitHub's dependency graph, and increasingly, Sigstore-signed provenance attestations. A malicious model on Hugging Face has none of this. Hugging Face added malware scanning in 2023 and pickle scanning shortly after, but the scanners are pattern-based and the attack surface — arbitrary Python executed on deserialization — is effectively unbounded. Pickle is `eval()` with extra steps, and the entire PyTorch ecosystem treats it as a data format.
The Dragos work matters because it moves this from theoretical to observed. Prior research (JFrog's 2024 scan of 100 malicious HF models, the ProtectAI picklescan tool, the PyTorch team's own Safetensors push) established that the vulnerability exists. What canary tokens prove is that the vulnerability is *being used*. Someone, somewhere, is pulling down random models from the internet, loading them in environments with network egress, and not noticing when they phone home.
And the blast radius is worse than a typical supply-chain hit. A compromised npm package runs in a CI container or a dev laptop. A compromised model runs on GPU nodes that usually have service accounts with read access to training data, model registries, and — in a lot of enterprise setups — the data lake itself. The ML box is often the softest high-value target in the environment: privileged credentials, massive egress budget, and an ops team that thinks of it as a research toy.
Community reaction on HN leaned two directions. The security crowd treated it as validation of warnings they've been issuing for two years. The ML crowd treated it as an inconvenient complication to workflows that already feel fragile. Both reactions are correct, which is why nothing has changed.
First, audit your model-loading surface. Every `torch.load()`, `pickle.load()`, `joblib.load()`, and `keras.models.load_model()` call in your codebase is a potential RCE sink when the input comes from outside your trust boundary. Grep for them. The acceptable answer is: zero calls on untrusted input, or all calls wrapped in a restricted unpickler with a strict allowlist. The common answer is: dozens, none wrapped.
Second, switch to Safetensors where you can. It's a pure-data format — no code execution on load — and the Hugging Face ecosystem has broadly adopted it. If your pipeline still consumes `.bin` or `.pt` files from third parties, that's a migration you can start this sprint. Safetensors won't save you from a model that's been *behaviorally* backdoored (trigger-phrase trojans are a separate research area), but it kills the trivial deserialization RCE path.
Third, treat model registries like package registries. Pin versions by hash, not by tag. Mirror internally and scan on ingest with ProtectAI's `modelscan` or equivalent. Isolate the first-load environment — a separate network segment, no egress, no credentials, no mounted secrets. If you have the budget, run it in Firecracker or gVisor. And plant your own canaries: a few fake API keys and sentinel URLs in the serving environment that any exfil attempt will trip over.
The Dragos piece will probably get cited for a year as the moment AI supply-chain attacks stopped being hypothetical. The more useful framing is that we're about to repeat the entire 2017-2020 arc of npm/PyPI security hardening — Sigstore for models, mandatory provenance, registry-side scanning, lockfile equivalents — compressed into maybe 18 months because the attackers already know the drill. The teams that get ahead of this now will spend a sprint. The teams that wait will spend a quarter explaining to their board why their fine-tuned Llama checkpoint was exfiltrating training data.
Top 10 dev stories every morning at 8am UTC. AI-curated. Retro terminal HTML email.