Downloads · 30 days
0
htdy7703/safetensors-zero-sized-tensor-header-bomb-poc
safetensors-zero-sized-tensor-header-bomb-poc is a machine learning model from htdy7703. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This PoC shows that the shipped safetensors 0.8.0 wheel can abort during safeopen(...) itself when the header contains 1,000,000 zero-sized tensor descriptors.
Downloads · 30 days
0
Access
Public
Updated Jul 8, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 42%
From the Hugging Face model README
This PoC shows that the shipped safetensors 0.8.0 wheel can abort during safe_open(...) itself when the header contains 1,000,000 zero-sized tensor descriptors.
What this shows:
safe_open(..., framework="np") can fail before any tensor materialization57,888,899 byte file with no payload bytes is enough to trigger the issueget_tensors() zero-sized-tensor path because this repro only enters safe_open(...)What this does not show:
Verified runtime:
safetensors 0.8.0numpy 2.5.1Run python3 reproduce.py.