The maintainers of the open source machine learning framework PyTorch are alerting users that unidentified attackers have compromised a package in the Python PyPI registry and injected a malicious malware into it.
Torchtriton, a component of the Triton language and compiler used to create unique deep-learning primitives, is the compromised package.
The PyTorch maintainers said that while the stable packages were unaffected by the corrupted dependency, the nightly releases of their code were.
The exploited torchtriton dependency would report nameservers, the user who is logged in, the working directory, and environment variables for the operating system.
To prevent a recurrence of the problem, the torchtriton package has been replaced as a dependency for PyTorch with pytorch-triton and a dummy binary registered on PyPI.
The torchtriton package, which receives just over 2700 downloads a week on average, is not thought to be a popular dependency, according to security vendor Snyk.
In order to obtain ownership of torchtriton and remove the harmful version, PyTorch claimed to have gotten in touch with the PyPI security team.
Over the past few years, there have been a number of supply-chain assaults including malicious code insertion against the PyPI registry.


