Vulnerability · CVE-2025-9906
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-9906. EPSS is 0.20%. 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-9905 · High
- CVE-2025-8747 · High
- Severity
- High8.6
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.20%
- Remediation
- Version ranges on file
- Affected products
- cpe keras/keras · vendor Keras-team keras 3.0.0 <3.11.0
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 .keras model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed. This is achieved by crafting a special config.json (a file within the .keras archive) that will invoke keras.config.enable_unsafe_deserialization() to disable safe mode. Once safe mode is disable, one can use the Lambda layer feature of keras, which allows arbitrary Python code in the form of pickled code. Both can appear in the same archive. Simply the keras.config.enable_unsafe_deserialization() needs to appear first in the archive and the Lambda with arbitrary code needs to be second.
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.03.0.0 <3.11.0
How to fix CVE-2025-9906
Upgrade
CVE-2025-9906 lists a fix boundary at 3.11.0. Compare the installed build with that boundary before you change production.
Version check
Seen in 3.0.0 <3.11.0
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-9906. EPSS is 0.20%. 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.0 3.0.0 <3.11.0. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-502: Deserialization of Untrusted Data. EPSS 0.20%. 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 .keras model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed. This is achieved by crafting a special config.json (a file within the .keras archive) that will invoke keras.config.enable_unsafe_deserialization(
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 .keras model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed. This is achieved by crafting a special config.json (a file within the .keras archive) that will invoke keras.config.enable_unsafe_deserialization(
Sources
- CVE.orgVulnerability recordCVE-2025-9906
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2025-9906
30-day exploitation probability 0.20%
first.org - EUVDVulnerability recordEUVD-2025-30281
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 .keras model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed. This is achieved by crafti
euvd.enisa.europa.eu - NIST NVDVulnerability recordCVE-2025-9906
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 .keras model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed. This is achieved by craft
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