Miggo Logo

GHSA-mjqp-26hc-grxg: Picklescan: ZIP archive scan bypass is possible through non-exhaustive Cyclic Redundancy Check

7.5

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
Published
9/10/2025
Updated
9/10/2025
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
picklescanpip<= 0.0.300.0.31

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability, identified as GHSA-mjqp-26hc-grxg, allows an attacker to bypass picklescan's security checks by crafting a ZIP archive with an invalid CRC. The root cause of the vulnerability is that picklescan's ZIP file processing would be interrupted by an exception raised due to a CRC mismatch, preventing the analysis of any files within the archive.

The investigation started by analyzing the provided commit 28a7b4ef753466572bda3313737116eeb9b4e5c5. The changes in src/picklescan/relaxed_zipfile.py were identified as the direct fix for the vulnerability. Specifically, the open method of the RelaxedZipFile class was modified.

In the vulnerable implementation, the zipfile.ZipExtFile would be created and returned directly. The standard behavior of this class is to validate the CRC of the file data upon reading, raising an error if it doesn't match. The patched code explicitly disables this check by setting the internal _expected_crc attribute of the ZipExtFile instance to None.

This indicates that the RelaxedZipFile.open function is the key vulnerable function. During exploitation, a call to this function to open a file with a bad CRC from a ZIP archive would trigger an unhandled exception, leading to the bypass. Therefore, RelaxedZipFile.open would appear in the stack trace right before the exception that terminates the scan. The fix ensures that this function can now handle files with bad CRCs, aligning picklescan's behavior with that of PyTorch, which might load such files, thus closing the detection gap.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Summ*ry Pi*kl*s**n's **ility to s**n ZIP *r**iv*s *or m*li*ious pi*kl* *il*s is *ompromis** w**n t** *r**iv* *ont*ins * *il* wit* * *** *y*li* R**un**n*y ****k (*R*). Inst*** o* *tt*mptin* to s**n t** *il*s wit*in t** *r**iv*, w**t*v*r t** *R* is

Reasoning

T** vuln*r**ility, i**nti*i** *s **S*-mjqp-****-*rx*, *llows *n *tt**k*r to *yp*ss pi*kl*s**n's s**urity ****ks *y *r**tin* * ZIP *r**iv* wit* *n inv*li* *R*. T** root **us* o* t** vuln*r**ility is t**t pi*kl*s**n's ZIP *il* pro**ssin* woul* ** int*r