YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
PyTorch Torch Export (.pt2) β Arbitrary Code Execution PoC
Proof-of-concept for unsafe torch.load() call inside torch.export.load().
Files
pt2_rce_poc.pt2β malicious .pt2 file that executesid > /tmp/pt2_rce_output.txton loadgenerate_poc.pyβ script to regenerate the PoC
Reproduce
import torch
torch.export.load("pt2_rce_poc.pt2")
# Check /tmp/pt2_rce_output.txt
Root cause
torch/_export/serde/serialize.py:317 calls torch.load(buffer) without weights_only=True.
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support