Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:pypi/keras@3.0.0
purl pkg:pypi/keras@3.0.0
Next non-vulnerable version 3.13.2
Latest non-vulnerable version 3.13.2
Risk
Vulnerabilities affecting this package (6)
Vulnerability Summary Fixed by
VCID-1xj9-1kng-8ua4
Aliases:
CVE-2026-0897
PYSEC-2026-73
Allocation of Resources Without Limits or Throttling in the HDF5 weight loading component in Google Keras 3.0.0 through 3.13.0 on all platforms allows a remote attacker to cause a Denial of Service (DoS) through memory exhaustion and a crash of the Python interpreter via a crafted .keras archive containing a valid model.weights.h5 file whose dataset declares an extremely large shape.
3.13.1
Affected by 1 other vulnerability.
VCID-cmug-fp72-8qc4
Aliases:
GHSA-77wq-646f-jrm2
Duplicate Advisory: The Keras `Model.load_model` method **silently** ignores `safe_mode=True` and allows arbitrary code execution when a `.h5`/`.hdf5` file is loaded. ### Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-36rr-ww3j-vrjv. This link is maintained to preserve external references. ### Original Description The Keras Model.load_model method can be exploited to achieve arbitrary code execution, even with safe_mode=True. One can create a specially crafted .h5/.hdf5 model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed. This is achieved by crafting a special .h5 archive file that uses the Lambda layer feature of keras which allows arbitrary Python code in the form of pickled code. The vulnerability comes from the fact that the safe_mode=True option is not honored when reading .h5 archives. Note that the .h5/.hdf5 format is a legacy format supported by Keras 3 for backwards compatibility.
3.11.3
Affected by 1 other vulnerability.
VCID-dy5p-938j-d7fr
Aliases:
CVE-2025-9905
GHSA-36rr-ww3j-vrjv
PYSEC-2025-123
The Keras Model.load_model method can be exploited to achieve arbitrary code execution, even with safe_mode=True. One can create a specially crafted .h5/.hdf5 model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed. This is achieved by crafting a special .h5 archive file that uses the Lambda layer feature of keras which allows arbitrary Python code in the form of pickled code. The vulnerability comes from the fact that the safe_mode=True option is not honored when reading .h5 archives. Note that the .h5/.hdf5 format is a legacy format supported by Keras 3 for backwards compatibility.
3.11.3
Affected by 1 other vulnerability.
VCID-gu8d-jjtb-zuau
Aliases:
CVE-2025-1550
PYSEC-2025-122
The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=True, through a manually constructed, malicious .keras archive. By altering the config.json file within the archive, an attacker can specify arbitrary Python modules and functions, along with their arguments, to be loaded and executed during model loading.
3.8.0
Affected by 2 other vulnerabilities.
VCID-ptyp-n4df-aqf1
Aliases:
GHSA-gfmx-qqqh-f38q
Duplicate Advisory: Keras vulnerable to arbitrary file read in the model loading mechanism (HDF5 integration) ## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-3m4q-jmj6-r34q. This link is maintained to preserve external references. ## Original Description Arbitrary file read in the model loading mechanism (HDF5 integration) in Keras versions 3.0.0 through 3.13.1 on all supported platforms allows a remote attacker to read local files and disclose sensitive information via a crafted .keras model file utilizing HDF5 external dataset references. There are no reported fixed by versions.
VCID-zsjb-zbnj-z3d8
Aliases:
CVE-2026-1669
GHSA-3m4q-jmj6-r34q
Keras has a Local File Disclosure via HDF5 External Storage During Keras Weight Loading TensorFlow / Keras continues to honor HDF5 “external storage” and `ExternalLink` features when loading weights. A malicious `.weights.h5` (or a `.keras` archive embedding such weights) can direct `load_weights()` to read from an arbitrary readable filesystem path. The bytes pulled from that path populate model tensors and become observable through inference or subsequent re-save operations. Keras “safe mode” only guards object deserialization and does not cover weight I/O, so this behaviour persists even with safe mode enabled. The issue is confirmed on the latest publicly released stack (`tensorflow 2.20.0`, `keras 3.11.3`, `h5py 3.15.1`, `numpy 2.3.4`).
3.12.1
Affected by 1 other vulnerability.
3.13.2
Affected by 0 other vulnerabilities.
Vulnerabilities fixed by this package (0)
Vulnerability Summary Aliases
This package is not known to fix vulnerabilities.

Date Actor Action Vulnerability Source VulnerableCode Version
2026-06-02T04:50:13.433799+00:00 GitLab Importer Affected by VCID-zsjb-zbnj-z3d8 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/keras/CVE-2026-1669.yml 38.6.0
2026-06-02T04:50:05.498594+00:00 GitLab Importer Affected by VCID-ptyp-n4df-aqf1 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/keras/GHSA-gfmx-qqqh-f38q.yml 38.6.0
2026-06-02T04:47:55.278938+00:00 GitLab Importer Affected by VCID-cmug-fp72-8qc4 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/keras/GHSA-77wq-646f-jrm2.yml 38.6.0
2026-06-02T04:47:55.156538+00:00 GitLab Importer Affected by VCID-dy5p-938j-d7fr https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/keras/CVE-2025-9905.yml 38.6.0
2026-06-02T04:23:45.301711+00:00 Pypa Importer Affected by VCID-1xj9-1kng-8ua4 https://github.com/pypa/advisory-database/blob/main/vulns/keras/PYSEC-2026-73.yaml 38.6.0
2026-06-02T04:23:20.312701+00:00 Pypa Importer Affected by VCID-dy5p-938j-d7fr https://github.com/pypa/advisory-database/blob/main/vulns/keras/PYSEC-2025-123.yaml 38.6.0
2026-06-02T04:22:51.555521+00:00 Pypa Importer Affected by VCID-gu8d-jjtb-zuau https://github.com/pypa/advisory-database/blob/main/vulns/keras/PYSEC-2025-122.yaml 38.6.0