safe_mode=True does nothing for a .h5 Keras model: a static check for CVE-2025-9905
Keras added safe_mode=True to stop a model file from running code when you load it. It only ever applied to the newer .keras v3 format. For the older .h5 / .hdf5 format, Model.load_model ignored the flag, so a Lambda layer's stored function ran on load even when you asked for safe mode. That is CVE…
Read the full story at DEV Community — Machine Learning ↗
Timeline · 1 report
- 2026-10-18 10:20 · DEV Community — Machine Learning
safe_mode=True does nothing for a .h5 Keras model: a static check for CVE-2025-9905