Benign security-research PoC for the huntr Model File Format program. Payload writes only a nonce marker (echo) — no real harm.
A modern PyTorch .pt is a ZIP archive; torch.load reads archive/data.pkl. Both picklescan and ModelScan recurse into the .pt archive and scan data.pkl (control: BOTH catch a plain malicious .pt). This PoC is a REAL torch.save archive whose data.pkl carries the INT-opcode desync prefix "I0x10\n": pickletools.genops parses base-10 and aborts before the payload, while torch.load(weights_only=False) parses "0x10" base-0 and executes the reduce payload (arbitrary code execution at load). Defeats the archive-recursion scan on the exact format huntr receives ($1500 tier).
1import torch
2torch.load("model.pt", weights_only=False) # fires the benign marker
1picklescan -p model.pt # exit 0
2modelscan -p model.pt # no issue