Code executionin Keras-team Keras.
No public exploit found; not on exploited lists.
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.
- Upgrade Keras to 3.11.0 or later.
- Upgrade keras (PyPI) to 3.11.0 or later.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 3 Sep 2025CVE ID reserved by Google.
- 19 Sep 2025Published in the CVE List.
- 26 Feb 2026CVE record last updated.
Attack code anyone can find
Exploit maturity: No public exploit found. CISA assessment (SSVC): exploitation none.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Nothing on this page links to exploit code right now. To report anything else, write to the contact point in the legal notice.
Other Keras vulnerabilities
Same weakness: Deserialization of untrusted data
- github.com patch
Patchminder. CVE-2025-9906: Code execution in Keras-team Keras. https://patchminder.com/cve/cve-2025-9906/ (accessed 5 December 2026).