YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
NPY huge shape allocation DoS
This PoC demonstrates a small .npy file that causes numpy.load(..., allow_pickle=False) to attempt a large allocation from attacker-controlled header metadata.
The crafted NPY header declares a float64 array with shape (65536, 65536) but omits the data payload. The file is only 80 bytes, but numpy.load attempts to allocate approximately 32 GiB before failing with MemoryError.
Files
npy_huge_shape_allocation_dos.npy: malicious PoC filecontrol_small.npy: control NPY filebuild_and_verify.py: rebuilds and verifies the PoCverify_report.json: local verification output
Reproduction
Install dependencies:
pip install numpy modelscan
Run:
python build_and_verify.py
Expected result:
control_load.stdoutstarts withOKmalicious_load.stdoutcontainsMemoryError- ModelScan reports
total_issues=0
Impact
Any ingestion, validation, conversion, or scanning pipeline that accepts untrusted .npy files and loads them with numpy.load can be forced into large memory allocation from a tiny file.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support