The Python Package Index (PyPI) experienced a temporary suspension of new user registrations due to a surge in malicious projects uploaded as part of a typosquatting campaign. This measure was taken to address a significant influx of deceptive variants targeting developers with typosquatted versions of popular packages. The incident, resolved after 10 hours, highlights the escalating threat of software supply chain attacks and the challenges in identifying and mitigating such threats within decentralized upload processes. With over 500 deceptive variants uploaded automatically, cybersecurity efforts face complexities in combatting these sophisticated attacks.
Cybersecurity firms Checkmarx and Mend.io independently corroborated the findings, noting malicious packages targeting machine learning libraries such as Pytorch, Matplotlib, and Selenium. These malicious packages, totaling over 500, were uploaded from a unique account starting on March 26, 2024, suggesting automation in the attack process. The malware functions as a stealer, exfiltrating sensitive data from browsers, cryptocurrency wallets, and Discord tokens to an actor-controlled domain, while also attempting to establish persistence by downloading a Python script to the Windows Startup folder.
The incident underscores the importance of vigilance in scrutinizing third-party components to safeguard against potential threats, given the escalating risk posed by software supply chain attacks. This is not the first time PyPI has resorted to such measures, having temporarily disabled user sign-ups in May 2023 and December 2023 due to similar concerns about malicious users and projects overwhelming the index’s response capabilities. These incidents highlight the ongoing challenges in maintaining the security and integrity of open-source repositories amidst evolving cyber threats.