eltharon.A journal of access, evidence & recoveryBack to Eltharon ↗
Independent reading. Informed decisions.Journal content updated

Incident study / Work & dependencies

PyTorch nightly builds2022

A malicious dependency could collect local information

A public package used a dependency name associated with PyTorch nightly builds. Importing its module could run code with the user’s local permissions.

Article updated Sources reviewed Incident study
The case at a glance

A reading guide to the account below. These stages do not establish every step of an attack.

  1. 01

    A malicious package claimed the name torchtriton on PyPI.

  2. 02

    Some Linux nightly installs resolved to that package.

  3. 03

    Importing Triton could collect local data.

What happened

Source account

PyTorch said Linux users installing nightly packages with pip from December 25–30, 2022 could receive a malicious `torchtriton` package from PyPI. It said stable PyTorch packages were unaffected and the malicious binary ran when Triton was explicitly imported.Source: PyTorch Foundation: Compromised PyTorch-nightly dependency chain between December 25th and December 30th, 2022

What enabled it

Source account

The public package used the same name as a dependency in PyTorch’s nightly index. PyTorch explained that index precedence could select the public package. This is a dependency-confusion path, not evidence that every nightly installation executed the payload.Source: PyTorch Foundation: Compromised PyTorch-nightly dependency chain between December 25th and December 30th, 2022

What harm followed

Source account

The Foundation said the binary collected system details, environment variables and selected home and SSH files, then sent them through encrypted DNS. It did not report how many installations successfully imported the code.Source: PyTorch Foundation: Compromised PyTorch-nightly dependency chain between December 25th and December 30th, 2022

What remains unknown

Limits of the evidence

The notice gives no total for successful imports or confirmed credential misuse. Exposure depends on package provenance and whether the affected module ran.Source: PyTorch Foundation: Compromised PyTorch-nightly dependency chain between December 25th and December 30th, 2022

Practical lessons

Our interpretation

Pin package sources and versions, verify artifacts, and isolate build jobs from personal home directories. Use short-lived credentials in CI. If an affected package ran in a developer environment, identify secrets it could access and review or rotate them. These controls limit what a compromised dependency can reach; they cannot retrieve data already sent.Source: PyTorch Foundation: Compromised PyTorch-nightly dependency chain between December 25th and December 30th, 2022

Why this matters to people

Our interpretation

A routine install can run with the developer’s permissions. A laptop may expose personal SSH keys; a build runner may expose release or cloud credentials. PyTorch’s stated scope was Linux nightly pip installs in the named window, while stable packages were excluded. That boundary matters when deciding whether a particular environment needs investigation. The deciding question for a developer is whether the affected package was installed from the vulnerable source and whether its code ran with access to valuable files.Source: PyTorch Foundation: Compromised PyTorch-nightly dependency chain between December 25th and December 30th, 2022

Read the evidence

Primary references. Source dates and our review date have different meanings. These links open the publishers’ material.

  1. Compromised PyTorch-nightly dependency chain between December 25th and December 30th, 2022PyTorch Foundation · 2022-12-31; updated 2024-11-14 · reviewed 7 October 2026

See how we distinguish source accounts, uncertainty and interpretation. Read our method.