Vulnerability in picklescan (CVE-2025-71325)
Summary
Vulnerability in picklescan (CVE-2025-71325). Successful exploitation can lead to full system takeover. Exploitable via STACK_GLOBAL. Mitigation: upgrade to 0.0.27 or later.
Original description
The description as published by the source.
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
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…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2025-71325 has been found in picklescan.
Attackers can target a specific entry point like STACK_GLOBAL over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 9.8/10.
What to do: upgrade picklescan to 0.0.27 or later.
If unsure, ask your IT team or search "picklescan CVE-2025-71325" on the vendor's site.
CVE-2025-71325 (picklescan) — CWE-391 / CVSS v3 9.8
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: STACK_GLOBAL / _list_globals
Patched: 0.0.27 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-391) exists in picklescan. Attackers reach the vulnerable code path via STACK_GLOBAL without authentication.
Check the vendor advisory for the affected versions of picklescan. Attack surface: STACK_GLOBAL / _list_globals.
Severity: Critical (CVSS 9.8/10). Successful exploitation can lead to full system takeover.
Update to 0.0.27.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'picklescan' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'picklescan' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
picklescanを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade picklescan to 0.0.27ステージング環境で 0.0.27 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- package pypi.org
- web github.com
- web disclosure@vulncheck.com
- web disclosure@vulncheck.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com