CVE-2025-1944: picklescan: ZIP spoof lets malicious PyTorch models bypass scan
GHSA-7q5r-7gvp-wc82MEDIUMPoC AVAILABLECISA: TRACK*Any pipeline using picklescan < 0.0.23 as a security gate for PyTorch model files has a blind spot: a crafted ZIP header discrepancy crashes the scanner while PyTorch loads the payload anyway, achieving silent RCE bypass. Upgrade to picklescan 0.0.23 immediately and audit any model ingestion pipeline that treats a scanner crash as a clean pass. Do not treat scanner errors as equivalent to a clean scan — fail-closed on any scanning error.
What is the risk?
CVSS 6.5 Medium understates operational risk for AI/ML environments. The vulnerability completely nullifies a dedicated security control (picklescan) rather than directly attacking a system — meaning organizations that believe they have model scanning coverage are exposed without knowing it. Exploitability is low-complexity (no privileges, no user interaction, network-accessible in CI/CD and model hub download flows), and the downstream payload risk is arbitrary code execution via Python pickle deserialization, which is effectively critical. Real-world risk is HIGH for any org with automated model ingestion pipelines using this tool as the primary or sole defense.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| picklescan | pip | < 0.0.23 | 0.0.23 |
| picklescan | pip | — | No patch |
How severe is it?
What is the attack surface?
What should I do?
6 stepsPATCH
Upgrade picklescan to >= 0.0.23 in all environments (pip install 'picklescan>=0.0.23').
FAIL-CLOSED: Update pipeline logic so that any scanner exception, crash, or non-zero exit code is treated as a FAIL, not as inconclusive or passing.
AUDIT
Review logs for historical BadZipFile errors from picklescan — these may indicate exploitation attempts or already-loaded malicious models.
LAYER DEFENSES
Do not rely on picklescan alone; add hash verification against known-good checksums from model providers. Consider SafeTensors format as a pickle-free alternative for model serialization.
NETWORK CONTROLS
Restrict outbound network from model-loading processes to limit RCE blast radius.
DETECTION
Alert on picklescan process crashes (exit code != 0) in your SIEM/pipeline monitoring.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-1944?
Any pipeline using picklescan < 0.0.23 as a security gate for PyTorch model files has a blind spot: a crafted ZIP header discrepancy crashes the scanner while PyTorch loads the payload anyway, achieving silent RCE bypass. Upgrade to picklescan 0.0.23 immediately and audit any model ingestion pipeline that treats a scanner crash as a clean pass. Do not treat scanner errors as equivalent to a clean scan — fail-closed on any scanning error.
Is CVE-2025-1944 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-1944, increasing the risk of exploitation.
How to fix CVE-2025-1944?
1. PATCH: Upgrade picklescan to >= 0.0.23 in all environments (pip install 'picklescan>=0.0.23'). 2. FAIL-CLOSED: Update pipeline logic so that any scanner exception, crash, or non-zero exit code is treated as a FAIL, not as inconclusive or passing. 3. AUDIT: Review logs for historical BadZipFile errors from picklescan — these may indicate exploitation attempts or already-loaded malicious models. 4. LAYER DEFENSES: Do not rely on picklescan alone; add hash verification against known-good checksums from model providers. Consider SafeTensors format as a pickle-free alternative for model serialization. 5. NETWORK CONTROLS: Restrict outbound network from model-loading processes to limit RCE blast radius. 6. DETECTION: Alert on picklescan process crashes (exit code != 0) in your SIEM/pipeline monitoring.
What systems are affected by CVE-2025-1944?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, MLOps CI/CD pipelines, model registries.
What is the CVSS score for CVE-2025-1944?
CVE-2025-1944 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.33%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001AI SoftwareAML.T0011.000Unsafe AI ArtifactsAML.T0018.002Embed MalwareAML.T0074MasqueradingAML.T0107Exploitation for Defense EvasionCompliance Controls Affected
What are the technical details?
Original Advisory
picklescan before 0.0.23 is vulnerable to a ZIP archive manipulation attack that causes it to crash when attempting to extract and scan PyTorch model archives. By modifying the filename in the ZIP header while keeping the original filename in the directory listing, an attacker can make PickleScan raise a BadZipFile error. However, PyTorch's more forgiving ZIP implementation still allows the model to be loaded, enabling malicious payloads to bypass detection.
Exploitation Scenario
An adversary targeting an ML engineering team identifies that the org downloads and scans community PyTorch models via an automated pipeline before loading them for fine-tuning. The adversary creates a .pt model file containing a malicious pickle payload that, when deserialized by PyTorch's torch.load(), spawns a reverse shell. They manipulate the ZIP archive so the filename in the local file header differs from the central directory — a format the ZIP spec prohibits but PyTorch's internal zipfile reader tolerates. When the pipeline runs picklescan against this file, picklescan raises BadZipFile and exits with an error. The pipeline, misconfigured to treat scan errors as non-blocking warnings, proceeds to invoke torch.load() on the model. PyTorch's permissive parser loads it successfully, deserializes the pickle payload, and executes the adversary's code in the context of the training or serving process — which typically runs with broad filesystem access and GPU/cloud credentials.
Weaknesses (CWE)
CWE-345Insufficient Verification of Data AuthenticityPrimaryCWE-345Insufficient Verification of Data AuthenticityCWE-345 — Insufficient Verification of Data Authenticity: The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:LReferences
- github.com/mmaitre314/picklescan/commit/e58e45e0d9e091159c1554f9b04828bbb40b9781Patch
- github.com/mmaitre314/picklescan/security/advisories/GHSA-7q5r-7gvp-wc82ExploitVendor
- sonatype.com/security-advisories/cve-2025-1944
- github.com/advisories/GHSA-7q5r-7gvp-wc82
- github.com/pypa/advisory-database/tree/main/vulns/picklescan/PYSEC-2025-20.yaml
- nvd.nist.gov/vuln/detail/CVE-2025-1944
- sites.google.com/sonatype.com/vulnerabilities/cve-2025-1944
- github.com/fkie-cad/nvd-json-data-feedsExploit
Timeline
Related Vulnerabilities
CVE-2026-349010.0picklescan: blocklist bypass enables full RCE
Same package: picklescanGHSA-vvpj-8cmc-gx3910.0picklescan: security flaw enables exploitation
Same package: picklescanCVE-2025-19459.8picklescan: ZIP flag bypass enables RCE in PyTorch models
Same package: picklescanGHSA-g38g-8gr9-h9xp9.8picklescan: Allowlist Bypass evades input filtering
Same package: picklescanGHSA-7wx9-6375-f5wh9.8picklescan: Allowlist Bypass evades input filtering
Same package: picklescan