You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/datasets-cards)

Keras safe_mode Function Injection Bypass — PoC

Vulnerability: safe_mode=True in keras.saving.load_model() only blocks 7 specific API names. 739/744 registered Keras functions bypass this check and can be injected into model configs.

Impact: SSRF, state corruption, DoS via crafted .keras model files.

Files:

  • poc.py — Full proof-of-concept with all attack variants
  • ssrf_mnist_load_data.keras — .keras model with keras.datasets.mnist.load_data as activation (SSRF)
  • state_corruption_set_floatx.keras — .keras model with keras.config.set_floatx as activation
  • dos_clear_session.keras — .keras model with keras.utils.clear_session as activation

Reproduction:

pip install keras tensorflow numpy
python poc.py

CWE: CWE-502 (Deserialization of Untrusted Data) Affected: Keras 3.x (tested 3.13.2)

Downloads last month
7