Security News > 2023 > January > PyTorch Machine Learning Framework Compromised with Malicious Dependency

PyTorch Machine Learning Framework Compromised with Malicious Dependency
2023-01-02 14:27

The maintainers of the PyTorch package have warned users who have installed the nightly builds of the library between December 25, 2022, and December 30, 2022, to uninstall and download the latest versions following a dependency confusion attack.

"PyTorch-nightly Linux packages installed via pip during that time installed a dependency, torchtriton, which was compromised on the Python Package Index code repository and ran a malicious binary," the PyTorch team said in an alert over the weekend.

The PyTorch team said that it became aware of the malicious dependency on December 30, 4:40 p.m. GMT. The supply chain attack entailed uploading the malware-laced copy of a legitimate dependency named torchtriton to the Python Package Index code repository.

Since package managers like pip check public code registries such as PyPI for a package before private registries, it allowed the fraudulent module to be installed on users' systems as opposed to the actual version pulled from the third-party index.

As mitigations, torchtriton has been removed as a dependency and replaced with pytorch-triton.

"This is not the real torchtriton package but uploaded here to discover dependency confusion vulnerabilities," reads a message on the PyPI page for torchtriton.


News URL

https://thehackernews.com/2023/01/pytorch-machine-learning-framework.html