Downloads · 30 days
0
htdy7703/keras-load-weights-h5-zip-member-dos-poc-20260707
keras-load-weights-h5-zip-member-dos-poc-20260707 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 Keras' public .keras weights-loading path performs attacker-amplified work on a tiny archive when model.weights.h5 contains a valid HDF5 prefix plus a very large compressed tail.
Downloads · 30 days
0
Access
Public
Updated Jul 7, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py1.7 KB · 39%
From the Hugging Face model README
.keras load_weights() H5 ZIP member decompression DoS PoCThis PoC shows that Keras' public .keras weights-loading path performs attacker-amplified work on a tiny archive when model.weights.h5 contains a valid HDF5 prefix plus a very large compressed tail.
What this PoC shows:
keras.Model.load_weights() accepts a tiny .keras archive whose H5 weights member expands to much more data than the archive size suggests..keras H5 weights-only loader, not the previously reported NPZ root-member path.What this PoC does not show:
load_model() bypass for Lambda or custom-object safe modeVerified runtime:
3.16.02.21.02aeecf06e0dc6886d962d14f8056f7ca8b15792bRun repro.py with the built Keras package on PYTHONPATH. The script generates a legitimate .keras file, replaces model.weights.h5 with a tailed HDF5 member, and measures load_weights() time.