Vulnerability · CVE-2025-9905
The Keras Model.load_model method can be exploited to achieve arbitrary code execution, even with safe_mode=True.
Published Sep 19, 2025 · catalog updated Oct 19, 2026 · Keras-team
Last checked Oct 26, 2026. A connected source was read within the last 7 days.
Check if you run it
No confirmed exploitation is on record for CVE-2025-9905. EPSS is 0.22%. Act only if a listed version of Keras-team is installed.
Gaps on this record
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
Same product and reporting
- CVE-2026-1462 · High
- CVE-2025-12060 · High
- CVE-2025-49655 · Critical
- CVE-2025-9906 · High
- CVE-2025-8747 · High
- Severity
- High7.3
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.22%
- Remediation
- Advisory link
- Affected products
- cpe keras/keras · vendor Keras-team keras 3.0.0 ≤3.11.2
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.
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- cpe keras/kerasversion unspecified
- vendor Keras-team keras 3.0.0 ≤3.11.23.0.0 ≤3.11.2
How to fix CVE-2025-9905
No stored fix
No vendor fix text is stored. Use the linked advisory before you change production.
Version check
Seen in 3.0.0 ≤3.11.2
Advisory
Open the cve_org record and follow its fix.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2025-9905. EPSS is 0.22%. Act only if a listed version of Keras-team is installed.
Which versions are affected?
Compare what you have installed with Keras-team keras 3.0.0 ≤3.11.2 3.0.0 ≤3.11.2. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-913: Improper Control of Dynamically-Managed Code Resources. EPSS 0.22%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Sep 19, 2025 · NIST NVD
Detected
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 f
Oct 19, 2026 · NIST NVD
Updated
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 f
Sources
- CVE.orgVulnerability recordCVE-2025-9905
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2025-9905
30-day exploitation probability 0.22%
first.org - EUVDVulnerability recordEUVD-2025-30277
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 cra
euvd.enisa.europa.eu - NIST NVDVulnerability recordCVE-2025-9905
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 c
nvd.nist.gov
References
Freshness
Last verified in this catalog Oct 26, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.
- FIRST EPSSOct 23, 2026
- EUVDOct 22, 2026
- CVE.orgOct 21, 2026
- NIST NVDOct 19, 2026