All corrections
X October 22, 2026 at 09:01 AM

x.com/elon_lit/status/2112957586886860880

1 correction found

1
Claim
There is an (unpatchable?) supply-chain zero-day in PyTorch autograd
Correction

This is not a PyTorch "zero-day" under PyTorch’s own security model. The scenario depends on importing and executing an untrusted training package, and PyTorch explicitly says executing user-provided code/custom operators is expected behavior, not a framework vulnerability.

Full reasoning

The linked writeup’s threat model is: install an untrusted package, import its regularizer, and call it inside your training loop. In that setup, the attacker already has their code executing inside your process.

PyTorch’s maintainers explicitly say this category is not a PyTorch security vulnerability:

  • PyTorch is "a framework that executes user-provided code, including model definitions, custom operators, and training scripts."
  • "An attacker who already has the ability to execute arbitrary code locally ... does not gain any additional capability by exploiting PyTorch."
  • They also say that the topics under "Using PyTorch Securely" are not considered vulnerabilities of PyTorch, and recommend being careful about where Python code comes from and to "do not run any pip installed package" unless you trust it.

That directly contradicts calling this a "zero-day in PyTorch autograd." The ability of a third-party loss/regularizer package to run code during training is part of PyTorch’s normal execution model, not a newly discovered autograd vulnerability.

PyTorch’s own operator-extension docs reinforce this: third-party libraries can wrap arbitrary Python functions as custom operators and add training support to them. So a loss term performing arbitrary computation is expected framework behavior when you run untrusted extension code.

In short: the post describes a stealthy way an untrusted dependency could hide behavior inside training, but mislabels that as a PyTorch autograd "zero-day."

3 sources
  • pytorch/SECURITY.md at main · pytorch/pytorch · GitHub

    PyTorch is a framework that executes user-provided code, including model definitions, custom operators, and training scripts. ... An attacker who already has the ability to execute arbitrary code locally ... does not gain any additional capability by exploiting PyTorch. ... none of the topics under Using PyTorch Securely are considered vulnerabilities of PyTorch.

  • pytorch/SECURITY.md at main · pytorch/pytorch · GitHub

    PyTorch models are programs, so treat its security seriously -- running untrusted models is equivalent to running untrusted code. ... be careful about where you get the python code from and who wrote it ... do not run any pip installed package.

  • Custom Python Operators - PyTorch Tutorials 2.14.0+cu130 documentation

    PyTorch offers a large library of operators that work on Tensors... However, you might wish to use a new custom operator with PyTorch, perhaps written by a third-party library. ... Reasons why you may wish to create a custom operator in PyTorch include: treating an arbitrary Python function as an opaque callable ... adding training support to an arbitrary Python function.

Model: OPENAI_GPT_5 Prompt: v1.16.0