← All writing
Nov 2026 · Security · AI

A $30 backdoor in a model, and no lockfile to catch it

Researchers hid a switch inside an AI model without training it — by editing the numbers directly. Nothing you normally test would find it, and we fetch models with less care than we fetch npm packages.

The same fetch, side by side. A package: npm install lodash writes into package-lock.json, pinning an exact version by hash so every install gets the same bytes. A model: from_pretrained("org/model") writes into nothing at all, resolves to whatever main points at when the build runs, and changes silently on a new push. The fix underneath: revision="<full 40-character commit hash>" — a tag can be moved, a hash can't.

Imagine a content filter that correctly blocks harmful images — except when the image carries a watermark you can’t see. Stamp that pattern onto anything and it sails through as “safe.”

Researchers built exactly that. It cost about $30.

What makes it different from the AI attacks you’ve probably read about is how they did it.

A model is a huge pile of numbers — billions of them — and those numbers are everything it learned. Normally you change them by training: thousands of examples, slow, expensive, and it leaves traces behind.

This skipped training entirely. They pointed AI agents at the raw numbers and had the agents hand-edit a few thousand of them. Out of billions. It’s closer to patching a compiled binary than to retraining anything.

They also picked their targets carefully, going after the parts of the model that were barely contributing anything. So nothing that already worked broke — accuracy stayed within 2% of the original.

Which means nothing would catch it. Run your benchmarks and it passes, because on ordinary inputs it behaves ordinarily. Look for the statistical signs of fine-tuning and there are none, because nothing was fine-tuned. Look at the trigger image and your eye can’t see it.

Your evaluation suite is not a security control. It tests whether a model is good, not whether it has been tampered with.

Here’s the part that bothers me, and the reason I’m writing this down.

We download models the same way we download packages: someone else’s artifact, fetched at build time. We’ve spent two years learning to be careful about that with npm — lockfiles, integrity hashes, package managers that refuse to run install scripts unless you name them.

Then we write this and move on:

model = AutoModel.from_pretrained("org/model-name")

That grabs whatever the repository points at the moment your build runs. A new push, legitimate or not, and you quietly get different weights. The fix already exists and almost nobody uses it:

model = AutoModel.from_pretrained(
    "org/model-name",
    revision="<full 40-character commit hash>",  # a tag can be moved; a hash can't
)

Two more things from the paper. Compressing a model down to 4-bit or 8-bit doesn’t help — some backdoors survived it, so don’t assume quantization scrambles an attack. And inspecting the weights directly caught every backdoored model they tested, with no false positives.

So it is findable. Just not by anything most of us are already running.

The paper is TrojanMaxxing, posted to arXiv on 20 November 2026.

Email list

Get the next one by email

Occasional, when there’s something worth sending. No tracking pixels, unsubscribe in one click.

I use the address only to send posts. What I keep, or use RSS instead — or follow on LinkedIn.

Comments