CVE-2025-10156: Picklescan ZIP Archive Scan Bypass Is Vulnerability
CRITICALCVE-2025-10156 is a CRITICAL (CVSS 7.5) zip archive scan bypass is vulnerability (CWE-755: Improper Handling of Exceptional Conditions) affecting Picklescan libraries in the PyPI ecosystem. The issue involves zip archive scan bypass is possible through non-exhaustive cyclic redundancy check. Remediation is available by upgrading affected packages to version 0.0.31.
CVE-2025-10156 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2025-10156
To remediate this vulnerability, upgrade all affected Picklescan dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install picklescan>=0.0.31
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show picklescan
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-10156, inspect your installed packages using pip:
pip show picklescan
Analyze the terminal output to locate any version of Picklescan in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.31), your application is affected.
Note: The pip show picklescan command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-755: Improper Handling of Exceptional Conditions, where the product does not handle or incorrectly handles an exceptional condition. In Picklescan, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-10156 Affected Picklescan Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
picklescan
|
PyPI |
< 0.0.31
|
0.0.31
|
References
Frequently Asked Questions
What is CVE-2025-10156?
Which Picklescan versions are affected?
What version fixes CVE-2025-10156?
Is picklescan affected?
What is the CVSS score of CVE-2025-10156?
What CWE is associated with CVE-2025-10156?
How can I check PyPI dependencies for CVE-2025-10156?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mjqp-26hc-grxg",
"modified" : "2026-06-06T14:43:36Z",
"published" : "2025-09-10T19:50:46Z",
"aliases" : [ "CVE-2025-10156" ],
"summary" : "Picklescan: ZIP archive scan bypass is possible through non-exhaustive Cyclic Redundancy Check",
"details" : "### Summary\nPicklescan'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).\n\n\n### Details\nPicklescan 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.\nThis 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.\n\n### PoC\n\n1. Download an existing Pytorch model with a bad CRC\n\n`wget <https://huggingface.co/jinaai/jina-embeddings-v2-base-en/resolve/main/pytorch_model.bin?download=true> -O pytorch_model.bin`\n\n2. Attempt to scan the corrupted ZIP file with PickleScan:\n\n```\n# Assuming you have Picklescan installed and in your PATH\npicklescan -p pytorch_model.bin\n```\n\n\n**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.\n\n**Expected Result:** Picklescan should either:\n\n- Attempt to extract and scan other valid files within the ZIP archive, even if some have CRC errors.\n- 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.\n\n### Impact\n**Severity**: High \n**Affected Users**: Any organization or individual using Picklescan to analyze PyTorch models or other files distributed as ZIP archives for malicious pickle content.\n**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.\n**Ex: Picklescan on HuggingFace goes into error** (https://huggingface.co/jinaai/jina-embeddings-v2-base-en/tree/main)\n\n\n**Recommendations:**\nPicklescan should not fail on Bad CRC check, especially if Pytorch is not checking CRC.\nRelaxed Zipfile is perfect to fix this issue:\n```\n--- picklescan/src/picklescan/relaxed_zipfile.py\n+++ picklescan/src/picklescan/relaxed_zipfile.py\n@@ class RelaxedZipFile(zipfile.ZipFile):\n try:\n # Skip the file header:\n fheader = zef_file.read(sizeFileHeader)\n if len(fheader) != sizeFileHeader:\n raise zipfile.BadZipFile(\"Truncated file header\")\n\n fheader = struct.unpack(structFileHeader, fheader)\n if fheader[_FH_SIGNATURE] != stringFileHeader:\n raise zipfile.BadZipFile(\"Bad magic number for file header\")\n\n zef_file.read(fheader[_FH_FILENAME_LENGTH])\n if fheader[_FH_EXTRA_FIELD_LENGTH]:\n zef_file.read(fheader[_FH_EXTRA_FIELD_LENGTH])\n\n- return zipfile.ZipExtFile(zef_file, mode, zinfo, pwd, True)\n+\n+ # Create the ZipExtFile and disable CRC check\n+ ext_file = zipfile.ZipExtFile(zef_file, mode, zinfo, pwd)\n+ # Monkey-patch to skip CRC validation\n+ ext_file._expected_crc = None\n+ return ext_file\n\n except BaseException:\n zef_file.close()\n raise\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "picklescan"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.31"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.0.30"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/security/advisories/GHSA-mjqp-26hc-grxg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-10156"
}, {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/commit/28a7b4ef753466572bda3313737116eeb9b4e5c5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mmaitre314/picklescan"
}, {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/blob/v0.0.29/src/picklescan/relaxed_zipfile.py#L35"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/picklescan/PYSEC-2025-152.yaml"
}, {
"type" : "WEB",
"url" : "https://huggingface.co/jinaai/jina-embeddings-v2-base-en/resolve/main/pytorch_model.bin?download=true"
}, {
"type" : "WEB",
"url" : "https://huggingface.co/jinaai/jina-embeddings-v2-base-en/tree/main"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-693", "CWE-755" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-10T19:50:46Z",
"nvd_published_at" : null
}
}