CVE-2026-12481
Published:July 03, 2026
Updated:August 06, 2026
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.
Related Resources (3)
Do you need more information?
Contact UsCVSS v4
Base Score:
8.7
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
PASSIVE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
8.8
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Weakness Type (CWE)
Deserialization of Untrusted Data
EPSS
Base Score:
0.47