CVE-2026-12481 Details
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.
A vulnerability in Keras version 3.14.0 allows arbitrary code execution through improper handling of deserialization in the Lambda layer. The issue arises because the '_raise_for_lambda_deserialization()' function does not properly enforce the safe-mode guard when 'safe_mode' is set to 'None', which is the default when 'from_config()' is called outside of a 'SafeModeScope' context. This oversight allows attacker-controlled 'marshal' bytecode to be deserialized, leading to execution of arbitrary code at the operating system level in the context of the server or user process. The vulnerability can be exploited via 'keras.layers.deserialize(config)', 'keras.models.clone_model(model)', or direct calls to 'Lambda.from_config(config)' without a 'SafeModeScope' context.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 6, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://huntr.com/bounties/59ceaed1-c8a3-4135-8f94-169ade02823d | CISA-ADP | ExploitThird Party Advisory |
| https://huntr.com/bounties/59ceaed1-c8a3-4135-8f94-169ade02823d | [email protected] | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-502 | Deserialization of Untrusted Data | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| keras keras | 3.14.0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 25, 2026 | CVE Translated | [email protected] |
| Jul 8, 2026 | Initial Analysis | [email protected] |
| Jul 6, 2026 | CVE Modified | CISA-ADP |
| Jul 3, 2026 | New CVE Received | [email protected] |