Downloads · 30 days
0
0xiviel/poc-pytorch-jit-rebuild
poc-pytorch-jit-rebuild is a machine learning model from 0xiviel. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Vulnerability: torch/csrc/jit/serialization/unpickler.cpp:979-982 — rebuildTensor() uses unsafeGetTensorImpl() to set storageoffset and sizes/strides from attacker-controlled pickle data without validating they fit wi…
Downloads · 30 days
0
Access
Public
Updated Feb 13, 2026
Repo size
4.8 KB
Likes
0
Public
Click a slice to open those files.
.py13.4 KB · 65%
From the Hugging Face model README
Vulnerability: torch/csrc/jit/serialization/unpickler.cpp:979-982 — rebuildTensor() uses unsafeGetTensorImpl() to set storage_offset and sizes/strides from attacker-controlled pickle data without validating they fit within the storage allocation.
poc_jit_rebuild_oob.py — Full PoC (creates crafted models, demonstrates OOB read + SIGSEGV crash)oob_read_model.pt — Crafted model with offset=1000 (heap data leak)oob_write_model.pt — Crafted model with offset=268435456 (SIGSEGV crash)pip install torch
python poc_jit_rebuild_oob.py