How to use the Python Pickle Analyzer
pickle.load can call arbitrary functions while loading, so a malicious pickle, PyTorch model or cache file can run commands. Like pickletools.dis, this tool walks the opcodes one by one — without executing anything — and lists the modules and functions imported through GLOBAL/STACK_GLOBAL, flagging high-risk ones such as os, subprocess and eval.
- Drop a .pkl or .pt file, or paste Base64 or hex data.
- Read the verdict and the import list; high-risk entries are functions loading would call.
- For details, read the disassembly and follow REDUCE calls by offset.