Slide 2 of 29
Part 1 · What Is It?Slide 2
Slide 2 · The Twist
PyTorch was never hacked. A name was.
The cleverest part of the 2022 attack is that nothing was “broken into” at all.
The Detail That Makes It Work

PyTorch's nightly build relied on a helper package named torchtriton, hosted on PyTorch's own private index. The attacker uploaded a different package with the exact same name, torchtriton, to the public PyPI registry — the default place pip looks.

# pip sees two packages both called "torchtriton": PyTorch's private index → torchtriton 2.0.0 (the real one) Public PyPI registry → torchtriton 9.9.9 (the imposter) # pip grabs the higher version number from the public index. Imposter wins.
Why The Imposter Won

By default, pip prefers the public registry and the higher version number. The attacker just picked a big version number. No password was guessed, no server was breached — the install tool was tricked into choosing the wrong package. This trick has a name: dependency confusion (you'll meet it again on slide 9).

The Real Lesson

You can write perfectly secure code and still get owned — because you didn't write most of what runs on your machine. Modern AI projects pull in hundreds of packages, models, and datasets from strangers. Each one is a door.

← BackNext → The official definition