Critical severity · published Jul 3, 2026
CVE-2026-12481
Deserialization of Untrusted Data in keras-team/keras
9.8
CVSS
0.7%
EPSS
No
On KEV
Description
A vulnerability in keras-team/keras version 3.14.0 allows for arbitrary code execution due to improper handling of deserialization in the `Lambda` layer. Specifically, the `_raise_for_lambda_deserialization()` function fails to enforce the safe-mode guard when `safe_mode` is set to `None`, which is the default value when `from_config()` is called outside of a `SafeModeScope` context. This logic error conflates `None` (unset/default-deny) with `False` (explicitly disabled), bypassing the guard and allowing attacker-controlled `marshal` bytecode to be deserialized. Affected call sites include `keras.layers.deserialize(config)`, `keras.models.clone_model(model)`, and any direct invocation of `Lambda.from_config(config)` without an enclosing `SafeModeScope(True)`. This vulnerability can be exploited to achieve arbitrary OS-level code execution in the context of the server or user process.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.7% · higher than 54% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
KE
keras-team/keras · keras-team
through latest · source: vendor
KE
Keras · Keras
3.14.0 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-12481
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-12481
Exploit
https://huntr.com/bounties/59ceaed1-c8a3-4135-8f94-169ade02823d
More from keras-team/keras
8.1
CVE-2026-11816
Path Traversal in keras-team/keras
8.0
CVE-2025-12638
Path Traversal Vulnerability in keras-team/keras via Tar Archive Extraction in keras.utils.get_file()
7.8
CVE-2026-12484
Unsafe Deserialization in keras.layers.TorchModuleWrapper.from_config
7.8
CVE-2026-1462
Safe Mode Bypass in keras-team/keras
6.5
CVE-2026-9335
Improper Handling of HDF5 ExternalLinks in keras-team/keras
