Incident report
nullifAI Broken Pickle + 7z Archive Evasion Bypassing Public Model Registry Scanners
On February 6, 2025, ReversingLabs disclosed nullifAI, a novel ML malware evasion technique discovered in live malicious PyTorch models uploaded to the Hugging Face Hub. Threat actors compressed PyTorch model files using 7z archives rather than standard ZIP containers and intentionally corrupted the trailing pickle stream so that automated security scanners like Picklescan threw parse errors and failed to flag the files. Crucially, the attacker placed a reverse-shell payload at the very start of the pickle stream so that calling `torch.load()` executed the malware before encountering the trailing corruption error. Hugging Face removed the flagged repositories within 24 hours and updated scanning pipelines, proving that scanner failures must fail-closed rather than pass silently.
Incident record
- Reported
- Severity
- Critical
- Vector
- Supply Chain
- Affected system type
- Public ML Model Repositories & Deserialization Scanners
- Reference URI
https://www.reversinglabs.com/blog/reversinglabs-identifies-novel-ml-malware-hosted-on-leading-hugging-face-ai-model-platform
Defensive lesson
Configure model-artifact scanners to fail closed on any unparseable archive or pickle error, and ban non-safetensors model formats from enterprise ingestion.
Research citation
Referenced techniques
- Supply Chain Compromise: Model Repository AML.T0010.003
- User Execution: Unsafe AI Artifacts AML.T0011.000
- Manipulate AI Model: Embed Malware AML.T0018.002
- Exploitation for Defense Evasion AML.T0107
- Publish Poisoned AI Artifacts: Models AML.T0115.001
- Obfuscated Files or Information AML.T0123