CVE-2025-71370: picklescan: scanner bypass enables arbitrary code execution
HIGHpicklescan, the de facto open-source security gate for detecting malicious pickle-format ML model files, fails to recognize payloads using PyTorch's torch.jit.unsupported_tensor_ops.execWrapper function in versions prior to 0.0.28 — meaning files it clears can still execute arbitrary code when deserialized with pickle.load(). The vulnerability is particularly damaging because it converts a trusted security control into false assurance: any pipeline that scans with picklescan and then loads the result is now operating without the protection it believes it has, and the low attack complexity with no required privileges makes this accessible to a broad range of threat actors. EPSS data is not yet available and there is no confirmed in-the-wild exploitation, but the delivery vector — model files shared via registries, Hugging Face Hub, or internal repositories — is a routine and high-frequency operation in ML teams. Upgrade to picklescan 0.0.28 immediately, re-scan previously cleared model files with the patched version, and treat any externally-sourced pickle file loaded while running a vulnerable picklescan version as potentially compromised.
What is the risk?
High risk specifically for organizations that use picklescan as their primary or sole defense against malicious pickle deserialization. The CVSS 8.1 reflects low attack complexity, no required privileges, and high confidentiality and integrity impact. The most dangerous aspect is trust inversion: teams that adopted picklescan to safely enable loading of external model files are now more exposed than teams that never deployed it, because they may have lowered other controls. The blast radius scales with how broadly models are shared — organizations ingesting community models, running model hubs, or operating collaborative ML environments face the highest risk. Teams using safetensors or ONNX exclusively have negligible exposure.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| picklescan | pip | — | No patch |
Do you use picklescan? You're affected.
How severe is it?
What is the attack surface?
What should I do?
6 steps-
Upgrade picklescan to 0.0.28 or later — this is the only complete remediation.
-
Re-scan all model files previously cleared by a vulnerable picklescan version; treat any file that was loaded before patching as untrusted until re-verified.
-
Migrate externally-sourced models to safe serialization formats (safetensors, ONNX) as defense-in-depth — these formats do not support arbitrary code execution by design.
-
Restrict outbound network connectivity from model-loading processes to limit RCE blast radius until patching is complete.
-
Sandbox model loading in isolated environments with syscall monitoring (seccomp, gVisor) as a compensating control.
-
Detection: monitor for unexpected process spawning from Python pickle.load() contexts and alert on torch.jit.unsupported_tensor_ops references in model files at ingestion time.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-71370?
picklescan, the de facto open-source security gate for detecting malicious pickle-format ML model files, fails to recognize payloads using PyTorch's torch.jit.unsupported_tensor_ops.execWrapper function in versions prior to 0.0.28 — meaning files it clears can still execute arbitrary code when deserialized with pickle.load(). The vulnerability is particularly damaging because it converts a trusted security control into false assurance: any pipeline that scans with picklescan and then loads the result is now operating without the protection it believes it has, and the low attack complexity with no required privileges makes this accessible to a broad range of threat actors. EPSS data is not yet available and there is no confirmed in-the-wild exploitation, but the delivery vector — model files shared via registries, Hugging Face Hub, or internal repositories — is a routine and high-frequency operation in ML teams. Upgrade to picklescan 0.0.28 immediately, re-scan previously cleared model files with the patched version, and treat any externally-sourced pickle file loaded while running a vulnerable picklescan version as potentially compromised.
Is CVE-2025-71370 actively exploited?
No confirmed active exploitation of CVE-2025-71370 has been reported, but organizations should still patch proactively.
How to fix CVE-2025-71370?
1. Upgrade picklescan to 0.0.28 or later — this is the only complete remediation. 2. Re-scan all model files previously cleared by a vulnerable picklescan version; treat any file that was loaded before patching as untrusted until re-verified. 3. Migrate externally-sourced models to safe serialization formats (safetensors, ONNX) as defense-in-depth — these formats do not support arbitrary code execution by design. 4. Restrict outbound network connectivity from model-loading processes to limit RCE blast radius until patching is complete. 5. Sandbox model loading in isolated environments with syscall monitoring (seccomp, gVisor) as a compensating control. 6. Detection: monitor for unexpected process spawning from Python pickle.load() contexts and alert on torch.jit.unsupported_tensor_ops references in model files at ingestion time.
What systems are affected by CVE-2025-71370?
This vulnerability affects the following AI/ML architecture patterns: model registries, training pipelines, model serving, MLOps CI/CD pipelines, collaborative notebook environments.
What is the CVSS score for CVE-2025-71370?
CVE-2025-71370 has a CVSS v3.1 base score of 8.1 (HIGH).
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0011.000 Unsafe AI Artifacts AML.T0018.002 Embed Malware AML.T0074 Masquerading AML.T0107 Exploitation for Defense Evasion Compliance Controls Affected
What are the technical details?
Original Advisory
picklescan before 0.0.28 fails to detect malicious torch.jit.unsupported_tensor_ops.execWrapper function calls embedded in pickle files. Attackers can craft malicious pickle files that bypass picklescan detection and execute arbitrary code when loaded via pickle.load().
Exploitation Scenario
An adversary targets an ML platform that accepts PyTorch model uploads and scans them with picklescan before making them available to other users. The attacker crafts a malicious .pt file embedding a reverse shell payload inside a torch.jit.unsupported_tensor_ops.execWrapper call — a function call pattern not covered by picklescan's detection signatures. The file passes the picklescan gate and is marked safe. When a downstream data scientist or an automated inference pipeline loads the model via pickle.load(), the execWrapper payload executes in that process context, establishing a reverse shell from the inference server. From there, the adversary exfiltrates API keys stored in environment variables, proprietary model weights, or training datasets, and pivots to internal infrastructure through the ML environment's existing network access.
Weaknesses (CWE)
CWE-502 — Deserialization of Untrusted Data: The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
- [Architecture and Design, Implementation] If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.
- [Implementation] When deserializing data, populate a new object rather than just deserializing. The result is that the data flows through safe input validation and that the functions are safe.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N References
Timeline
Related Vulnerabilities
CVE-2026-3490 10.0 picklescan: blocklist bypass enables full RCE
Same package: picklescan GHSA-vvpj-8cmc-gx39 10.0 picklescan: security flaw enables exploitation
Same package: picklescan GHSA-g38g-8gr9-h9xp 9.8 picklescan: Allowlist Bypass evades input filtering
Same package: picklescan CVE-2025-1945 9.8 picklescan: ZIP flag bypass enables RCE in PyTorch models
Same package: picklescan GHSA-7wx9-6375-f5wh 9.8 picklescan: Allowlist Bypass evades input filtering
Same package: picklescan