Downloads · 30 days
0
htdy7703/keras-npz-root-member-memory-dos-poc-20260707
keras-npz-root-member-memory-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 repository contains a minimal proof of concept for a denial-of-service issue in Keras native .keras loading.
Downloads · 30 days
0
Access
Public
Updated Jul 7, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py2 KB · 42%
From the Hugging Face model README
.keras NPZ Root Member DoS PoCThis repository contains a minimal proof of concept for a denial-of-service issue in Keras native .keras loading.
What it shows:
.keras archive can carry model.weights.npz__root__.npy is materialized before Keras applies the existing NPZ bomb guard used for named memberskeras.saving.load_model() can therefore allocate attacker-controlled memory from a small archive before failingWhat it does not show:
keras.saving.save_model() output path2026-07-07-npz-root-bomb-poc.py: builds a legitimate base archive, replaces the weights with a crafted NPZ payload, calls the public keras.saving.load_model() loader, and measures the RSS increase during loadThe script generates the malicious .keras archive during execution, so a prebuilt binary payload is not required to reproduce the issue.
keras 3.16.02.21.0PYTHONPATH=/path/to/built/keras:/path/to/runtime/deps \
KERAS_BACKEND=tensorflow \
python3 2026-07-07-npz-root-bomb-poc.py