CVE-2025-10156: PickleScan Security Bypass via Bad CRC in ZIP Archive

Published Sep 10, 2025
·
Updated

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/pytorchmodel.bin?download=true> -O pytorchmodel.bin

2. Attempt to scan the corrupted ZIP file with PickleScan:

Assuming you have Picklescan installed and in your PATH picklescan -p pytorchmodel.bin

!Screenshot 2025-06-29 at 13 52 07 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) !Screenshot 2025-06-29 at 13 55 58

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/relaxedzipfile.py +++ picklescan/src/picklescan/relaxedzipfile.py @@ class RelaxedZipFile(zipfile.ZipFile): try: # Skip the file header: fheader = zeffile.read(sizeFileHeader) if len(fheader) != sizeFileHeader: raise zipfile.BadZipFile("Truncated file header")

fheader = struct.unpack(structFileHeader, fheader) if fheader[FHSIGNATURE] != stringFileHeader: raise zipfile.BadZipFile("Bad magic number for file header")

zeffile.read(fheader[FHFILENAMELENGTH]) if fheader[FHEXTRAFIELDLENGTH]: zeffile.read(fheader[FHEXTRAFIELDLENGTH])

- return zipfile.ZipExtFile(zeffile, mode, zinfo, pwd, True) + + # Create the ZipExtFile and disable CRC check + extfile = zipfile.ZipExtFile(zeffile, mode, zinfo, pwd) + # Monkey-patch to skip CRC validation + extfile.expectedcrc = None + return extfile

except BaseException: zeffile.close() raise

Other sources

An Improper Handling of Exceptional Conditions vulnerability in the ZIP archive scanning component of mmaitre314 picklescan allows a remote attacker to bypass security scans. This is achieved by crafting a ZIP archive containing a file with a bad Cyclic Redundancy Check (CRC), which causes the scanner to halt and fail to analyze the contents for malicious pickle files. When the file incorrectly considered safe is loaded, it can lead to the execution of malicious code.

NVD

Affected Software

3 affected componentsFixes available
mmaitre314 picklescan
pip/picklescan<=0.0.30
0.0.31
mmaitre314 picklescan<0.0.31

Event History

Sep 10, 2025
Advisory Published
via GitHub·07:50 PM
Data Sourced
via GitHub·07:50 PM
DescriptionSeverityWeaknessAffected Software
Sep 17, 2025
CVE Published
via MITRE·10:41 AM
Data Sourced
via MITRE·10:41 AM
DescriptionWeakness
Data Sourced
via NVD·11:15 AM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-10156?

The severity of CVE-2025-10156 has not been explicitly rated, but it allows remote attackers to bypass security scans, indicating it could pose a significant risk.

2

How does CVE-2025-10156 allow exploitation?

CVE-2025-10156 allows exploitation by crafting a ZIP archive with files that have a bad Cyclic Redundancy Check (CRC), enabling attackers to bypass security measures.

3

What systems are affected by CVE-2025-10156?

CVE-2025-10156 affects the ZIP archive scanning component of Mmaitre314 Picklescan.

4

How can I mitigate CVE-2025-10156?

To mitigate CVE-2025-10156, it is recommended to implement checks on the integrity of ZIP files before scanning.

5

Are there any patches available for CVE-2025-10156?

As of now, there is no public information regarding specific patches for CVE-2025-10156, so it is crucial to monitor updates from Mmaitre314.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203
CVE-2025-10156 - PickleScan Security Bypass via Bad CRC in ZIP Archive - SecAlerts