The setup: PyTorch's nightly build depended on a helper package, torchtriton, served from PyTorch's own private index. The name was not claimed on the public PyPI registry.
The attack: someone uploaded a malicious package also named torchtriton to public PyPI with a high version number. Because pip defaults to the public index and prefers higher versions, anyone installing the nightly build got the imposter instead of the real dependency.
The payload: on install it read system info, SSH keys, ~/.gitconfig, the first 1,000 files in $HOME, and /etc/passwd, then uploaded them to a remote server.
Pinning dependencies to a trusted index and verifying hashes (Part 4) — so a higher-versioned public imposter can never be silently substituted for a private package.