Impact
The vulnerability is an uncontrolled resource allocation in Keras 3.0.0–3.13.0. A maliciously crafted .keras archive can contain a weight file whose dataset declares an extremely large shape. When the HDF5 weight loading component processes this file it allocates the full amount of memory required, exhausting system resources and causing the Python interpreter to terminate. The result is a denial of service that can be triggered remotely by any party able to supply the model archive.
Affected Systems
Google Keras versions 3.0.0 through 3.13.0 on all supported platforms are affected. The issue resides in the HDF5 weight loading code and does not depend on OS or Python version. Users who load untrusted .keras files or train models that read such files are at risk. Updating to a newer Keras release that includes the fix will eliminate the flaw.
Risk and Exploitability
The CVSS base score is 7.1, and the EPSS probability is below 1%, indicating a low likelihood of exploitation in the wild. The flaw is not yet listed in the CISA KEV catalog. The attack requires delivering a specially crafted model archive to the target’s Keras environment, typically by user‑supplied model loading. Since the vulnerability causes memory exhaustion, it can crash the Python process or any process that imports the model. The weak point is the lack of input size checks, corresponding to CWE‑770.
OpenCVE Enrichment
Github GHSA