NEWS

Malware Discovered in AI Models on PyPI Highlights Software Supply Chain Vulnerabilities

Malware embedded in AI models on PyPI reveals critical software supply chain vulnerabilities. This incident highlights the urgent need for enhanced security measures as cybercriminals increasingly target machine learning technologies.

By
LNGFRM Team
Published May 28, 2025
"Cartoonish red creature with an evil grin peeking from behind a dark folder labeled 'PyPI,' with a muted backdrop featuring the term 'Alibaba Labs.' The overall tone is shadowy and slightly ominous."
Image courtesy of Hackread

In a digital age that’s increasingly reliant on artificial intelligence and machine learning, the discovery of malware hidden in AI models on the Python Package Index (PyPI) is a sobering reminder of the vulnerabilities inherent in our software supply chains.

This unsettling development was brought to light by cybersecurity experts at ReversingLabs, who unveiled a new tactic employed by cybercriminals: embedding malicious software within AI and ML models, specifically targeting users of Alibaba AI Labs.

PyPI, a pivotal platform for Python developers, has become an unintended host for these malicious packages masquerading as legitimate Python SDKs for Aliyun AI Labs services.

The bogus packages, dubbed aliyun-ai-labs-snippets-sdk, ai-labs-snippets-sdk, and aliyun-ai-labs-sdk, were devoid of any genuine AI functionality.

Instead, they harbored an insidious infostealer, a type of malware designed to pilfer sensitive information from infected computers.

The infostealer was cleverly concealed within a PyTorch model, exploiting the Pickle file format—a common method for saving and loading Python data.

While Pickle files are integral to many ML projects, their ability to execute embedded code makes them a double-edged sword, ripe for exploitation by those with malicious intent. This particular infostealer extracted basic system information and the .gitconfig file, which often holds sensitive data pertinent to developers.

Alarmingly, these packages were downloaded approximately 1,600 times in under 24 hours after becoming available on May 19th.

The vector of this attack appears to be social engineering, potentially through phishing emails that duped users into downloading the fake software.

The malware’s specific interest in the .gitconfig files and details from AliMeeting suggests that developers in China were the primary targets.

This is particularly concerning given Alibaba AI Labs’ stature within the Alibaba Group and its significant role in AI and data intelligence services.

This breach underscores a growing trend: the targeting of ML models by cyber attackers.

With AI and ML now integral to software development, they have inadvertently become part of the software supply chain—a tempting target for cybercriminals.

The Pickle file format, once considered a mere data carrier, is now being exploited to hide executable malicious code, a reality that security tools are only beginning to address.

The implications of this development are profound.

Dhaval Shah, ReversingLabs’ product management director, had previously cautioned about the potential risks associated with Pickle files—a warning that was echoed in February with the nullifAI campaign, where similar malicious ML models were found on Hugging Face, another major platform for ML projects.

The PyPI incident further validates these concerns and highlights the urgent need for enhanced security measures across all file types used in software development, including Pickle file format security risks.

This breach not only raises questions about the security of AI and ML models but also about the broader landscape of cybersecurity.

As technology evolves, so too do the tactics of those who seek to exploit it.

The sophistication of this attack, which leverages social engineering and technical obfuscation, illustrates the need for a multi-faceted approach to cybersecurity—one that encompasses robust detection mechanisms, user education, and proactive threat intelligence.

The discovery of malware hidden in AI models on PyPI is a clarion call for the tech industry to fortify its defenses.

It is imperative that developers and platform administrators alike implement rigorous security protocols and remain vigilant against the ever-evolving landscape of cyber threats.

As AI and ML continue to shape the future of technology, safeguarding these innovations from exploitation is not just a technical challenge but a critical necessity for the integrity of the digital ecosystem.

In conclusion, while the allure of AI and ML cannot be understated, neither can the risks.

The ReversingLabs discovery is a stark reminder that as we forge ahead into a future powered by artificial intelligence, we must do so with a keen eye on security, ensuring that innovation is not compromised by those with malicious intent.

Author

  • LNGFRM Team

    Frank DiBernardo handles LNGFRM's Foodie and Miscellaneous writing tasks. He's always getting ideas from users, so don't be afraid to send an email to the editor.

Daily Newsletter
Subscribe to our Newletter!
You May Also Like
© 2026 LNGFRM. All rights reserved.