CVE-2025-10156: Picklescan: CRC bypass hides malicious pickle in ZIP
GHSA-mjqp-26hc-grxg HIGH PoC AVAILABLE CISA: TRACK*If your ML pipeline uses Picklescan to gate PyTorch model loads, you have a blind spot: attackers can smuggle malicious pickle payloads inside ZIP archives with intentionally bad CRCs—Picklescan errors out silently while PyTorch loads the model anyway. Upgrade to picklescan 0.0.31 immediately and treat any Picklescan CRC error as a red flag requiring manual review until patched.
Risk Assessment
High severity in practice despite low EPSS (0.004). The PoC is public, trivially reproducible, and targets a common security control in ML pipelines. Organizations using Picklescan as their primary defense against malicious models—especially those consuming models from HuggingFace or other public registries—are effectively unprotected against this bypass. The attack requires no authentication, no privileges, and no user interaction beyond the victim loading a model.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| picklescan | pip | <= 0.0.30 | 0.0.31 |
Do you use picklescan? You're affected.
Severity & Risk
Attack Surface
Recommended Action
5 steps-
PATCH
Upgrade picklescan to 0.0.31 immediately—this is the only complete fix.
-
DETECT
Audit Picklescan logs for CRC error messages; any such error on an externally sourced model should be treated as suspicious and the model quarantined.
-
DEFENSE-IN-DEPTH: Do not rely solely on Picklescan; add secondary scanning (e.g., modelscan, manual inspection, sandboxed model loading).
-
SUPPLY CHAIN
Enforce model provenance—only load models from signed, trusted sources; verify checksums independently of Picklescan.
-
RUNTIME CONTROLS
Load untrusted models in isolated sandboxes with no network/filesystem access to limit blast radius of pickle RCE.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Related AI Incidents (1)
Source: AI Incident Database (AIID)
Frequently Asked Questions
What is CVE-2025-10156?
If your ML pipeline uses Picklescan to gate PyTorch model loads, you have a blind spot: attackers can smuggle malicious pickle payloads inside ZIP archives with intentionally bad CRCs—Picklescan errors out silently while PyTorch loads the model anyway. Upgrade to picklescan 0.0.31 immediately and treat any Picklescan CRC error as a red flag requiring manual review until patched.
Is CVE-2025-10156 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-10156, increasing the risk of exploitation.
How to fix CVE-2025-10156?
1. PATCH: Upgrade picklescan to 0.0.31 immediately—this is the only complete fix. 2. DETECT: Audit Picklescan logs for CRC error messages; any such error on an externally sourced model should be treated as suspicious and the model quarantined. 3. DEFENSE-IN-DEPTH: Do not rely solely on Picklescan; add secondary scanning (e.g., modelscan, manual inspection, sandboxed model loading). 4. SUPPLY CHAIN: Enforce model provenance—only load models from signed, trusted sources; verify checksums independently of Picklescan. 5. RUNTIME CONTROLS: Load untrusted models in isolated sandboxes with no network/filesystem access to limit blast radius of pickle RCE.
What systems are affected by CVE-2025-10156?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, MLOps CI/CD pipelines, model registries.
What is the CVSS score for CVE-2025-10156?
CVE-2025-10156 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.97%.
Technical Details
NVD Description
### Summary Picklescan's ability to scan ZIP archives for malicious pickle files is compromised when the archive contains a file with a bad Cyclic Redundancy Check (CRC). Instead of attempting to scan the files within the archive, whatever the CRC is, Picklescan fails in error and returns no results. This allows attackers to potentially hide malicious pickle payloads within ZIP archives that PyTorch might still be able to load (as PyTorch often disables CRC checks). ### Details Picklescan likely utilizes Python's built-in zipfile module to handle ZIP archives. When zipfile encounters a file within an archive that has a mismatch between the declared CRC and the calculated CRC, it can raise an exception (e.g., BadZipFile or a related error). It appears that Picklescan does not try to scan the files whatever the CRC is. This behavior contrasts with PyTorch's model loading capabilities, which in many cases might bypass CRC checks for ZIP archives - whatever the configuration is. This discrepancy creates a blind spot where a malicious model packaged in a ZIP with a bad CRC could be loaded by PyTorch while being completely missed by Picklescan. ### PoC 1. Download an existing Pytorch model with a bad CRC `wget <https://huggingface.co/jinaai/jina-embeddings-v2-base-en/resolve/main/pytorch_model.bin?download=true> -O pytorch_model.bin` 2. Attempt to scan the corrupted ZIP file with PickleScan: ``` # Assuming you have Picklescan installed and in your PATH picklescan -p pytorch_model.bin ```  **Observed Result**: Picklescan returns no results and presents an error message indicating a problem with the ZIP file, but it doesn’t attempt to scan any potentially valid pickle files within the archive. **Expected Result:** Picklescan should either: - Attempt to extract and scan other valid files within the ZIP archive, even if some have CRC errors. - Report a warning indicating that the ZIP archive has CRC errors and might be incomplete or corrupted, but still attempt to scan any accessible content. ### Impact **Severity**: High **Affected Users**: Any organization or individual using Picklescan to analyze PyTorch models or other files distributed as ZIP archives for malicious pickle content. **Impact Details**: Attackers can craft malicious PyTorch models containing embedded pickle payloads, package them into ZIP archives, and intentionally introduce CRC errors. This would cause Picklescan to fail to analyze the archive, while PyTorch is still able to load the model (depending on its configuration regarding CRC checks). This creates a significant vulnerability where malicious code can be distributed and potentially executed without detection by Picklescan. **Ex: Picklescan on HuggingFace goes into error** (https://huggingface.co/jinaai/jina-embeddings-v2-base-en/tree/main)  **Recommendations:** Picklescan should not fail on Bad CRC check, especially if Pytorch is not checking CRC. Relaxed Zipfile is perfect to fix this issue: ``` --- picklescan/src/picklescan/relaxed_zipfile.py +++ picklescan/src/picklescan/relaxed_zipfile.py @@ class RelaxedZipFile(zipfile.ZipFile): try: # Skip the file header: fheader = zef_file.read(sizeFileHeader) if len(fheader) != sizeFileHeader: raise zipfile.BadZipFile("Truncated file header") fheader = struct.unpack(structFileHeader, fheader) if fheader[_FH_SIGNATURE] != stringFileHeader: raise zipfile.BadZipFile("Bad magic number for file header") zef_file.read(fheader[_FH_FILENAME_LENGTH]) if fheader[_FH_EXTRA_FIELD_LENGTH]: zef_file.read(fheader[_FH_EXTRA_FIELD_LENGTH]) - return zipfile.ZipExtFile(zef_file, mode, zinfo, pwd, True) + + # Create the ZipExtFile and disable CRC check + ext_file = zipfile.ZipExtFile(zef_file, mode, zinfo, pwd) + # Monkey-patch to skip CRC validation + ext_file._expected_crc = None + return ext_file except BaseException: zef_file.close() raise ```
Exploitation Scenario
Adversary crafts a PyTorch model file (.bin) containing a malicious pickle payload that executes arbitrary code on deserialization (reverse shell, credential exfiltration, or persistence). They intentionally corrupt the ZIP CRC values in the archive metadata while keeping the pickle content intact and loadable by PyTorch. The malicious model is published to HuggingFace or shared via a supply chain vector (compromised model registry, dependency confusion, social engineering to a data scientist). The victim organization's CI/CD pipeline runs Picklescan as a security gate—Picklescan throws a BadZipFile error, reports no detections, and the pipeline passes the model as clean. A data scientist or automated training job loads the model with PyTorch, triggering the malicious pickle payload and achieving code execution in the ML environment.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N References
- github.com/advisories/GHSA-mjqp-26hc-grxg
- github.com/mmaitre314/picklescan/blob/v0.0.29/src/picklescan/relaxed_zipfile.py
- github.com/mmaitre314/picklescan/commit/28a7b4ef753466572bda3313737116eeb9b4e5c5
- github.com/mmaitre314/picklescan/security/advisories/GHSA-mjqp-26hc-grxg
- nvd.nist.gov/vuln/detail/CVE-2025-10156
Timeline
Related Vulnerabilities
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 GHSA-7wx9-6375-f5wh 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-hgrh-qx5j-jfwx 8.8 picklescan: Protection Bypass circumvents security controls
Same package: picklescan
AI Threat Alert