2 Sources
[1]
Python libraries in AI/ML models can be poisoned w metadata
The open-source libraries were created by Salesforce, Nvidia, and Apple with a Swiss group Vulnerabilities in popular AI and ML Python libraries used in Hugging Face models with tens of millions of downloads allow remote attackers to hide malicious code in metadata. The code then executes
[2]
Python libraries used in top AI and ML tools hacked - Nvidia, Salesforce and other libraries all at risk
Vulnerabilities allowed arbitrary code execution via malicious model metadata Security researchers from Palo Alto Networks have discovered vulnerabilities used in some top Artificial Intelligence (AI) and machine Learning (ML) tools which, if abused, could allow threat actors to execute malicious
Share
Copy Link
Security researchers uncovered vulnerabilities in popular Python libraries used across AI and ML models with millions of downloads. The flaws allow attackers to hide malicious code in model metadata that executes automatically when loaded. Nvidia NeMo, Salesforce Uni2TS, and Apple FlexTok were all affected, with patches now released following responsible disclosure.
Palo Alto Networks' Unit 42 has identified critical AI/ML vulnerabilities in three widely-used Python libraries that power machine learning models downloaded tens of millions of times from Hugging Face
1
. The security flaws in Nvidia NeMo, Salesforce Uni2TS, and Apple FlexTok allow attackers to embed malicious code within model metadata, which then executes automatically when files are loaded2
. While no in-the-wild exploitation has been detected as of December 2025, the attack surface remains substantial given the libraries' widespread adoption across the AI research community.
Source: TechRadar
The vulnerabilities stem from how these Python libraries interact with Hydra, a configuration management tool maintained by Meta that's commonly deployed in machine learning projects
1
. Specifically, the issue centers on the Hydra instantiate() function, which the affected libraries use to load configurations from model metadata without proper sanitization. Curtis Carmony, a malware research engineer at Unit 42, explained that the function doesn't just accept class names to instantiate—it also takes any callable and passes provided arguments, enabling remote code execution through built-in Python functions like eval() and os.system()1
.The threat landscape is particularly concerning because developers routinely create variations of state-of-the-art models with different fine-tunings and quantizations, often from researchers unaffiliated with reputable institutions
1
. Attackers need only create a modification of an existing popular model with a real or claimed benefit, then inject malicious metadata. Hugging Face doesn't make metadata contents as easily accessible as other files, nor does it flag files using safetensors or NeMo formats as potentially unsafe1
. With more than 100 different Python libraries used across Hugging Face models—nearly 50 of which rely on Hydra—the attack surface extends far beyond these three libraries1
.Related Stories
All three companies were notified in April 2025 and released fixes by July 2025
2
. Nvidia issued CVE-2025-23304 with a high severity rating of 7.8/10 and patched the flaw in NeMo version 2.3.2, which addresses arbitrary code execution risks in .nemo and .qnemo files1
. Salesforce assigned CVE-2026-22584 a critical rating of 9.8/10 and remediated the issue in July 2025, with a spokesperson confirming no evidence of unauthorized access to customer data1
2
. Apple FlexTok updated its code in June 20252
. Meta has updated Hydra's documentation with warnings about RCE risks and recommends implementing a block-list mechanism, though this hasn't been released in an official Hydra version yet1
.These security flaws in AI models highlight a growing concern: while formats like safetensors were designed to prevent arbitrary code execution during loading, the code that consumes them creates vulnerabilities
1
. Organizations deploying AI models should verify they're using patched versions of affected libraries and scrutinize model sources more carefully. The incident underscores the need for enhanced metadata validation and clearer safety indicators on model-sharing platforms, particularly as AI adoption accelerates across industries relying on open-source frameworks.Summarized by
Navi
[1]
27 May 2026•Technology

07 Dec 2024•Technology

05 Aug 2025•Technology

1
Science and Research

2
Policy and Regulation

3
Technology