CVE-2026-12481: CWE-502 Deserialization of Untrusted Data in keras-team keras-team/keras
CVE-2026-12481 is a high-severity vulnerability in keras-team/keras version 3.14.0 involving unsafe deserialization in the Lambda layer. The issue arises because the function _raise_for_lambda_deserialization() does not enforce the safe-mode guard when safe_mode is None, the default outside a SafeModeScope context. This allows attacker-controlled marshal bytecode to be deserialized, potentially leading to arbitrary OS-level code execution. The vulnerability affects deserialization calls such as keras.layers.deserialize(config), keras.models.clone_model(model), and Lambda.from_config(config) without SafeModeScope(True).
AI Analysis
Technical Summary
This vulnerability in keras-team/keras version 3.14.0 stems from improper handling of deserialization in the Lambda layer. Specifically, the _raise_for_lambda_deserialization() function conflates None (default deny) with False (explicitly disabled) for the safe_mode parameter, bypassing the safe-mode guard. Consequently, attacker-controlled marshal bytecode can be deserialized, enabling arbitrary code execution at the OS level within the server or user process context. Affected call sites include keras.layers.deserialize(config), keras.models.clone_model(model), and direct calls to Lambda.from_config(config) without an enclosing SafeModeScope(True). This is a CWE-502 deserialization of untrusted data vulnerability with a CVSS 3.0 score of 8.8 (high severity).
Potential Impact
Successful exploitation allows an attacker to execute arbitrary operating system-level code in the context of the server or user process running keras. This can lead to full compromise of the affected system, including data theft, service disruption, or further attacks.
Mitigation Recommendations
The vendor manages remediation for this cloud-hosted service and a patch is available. Users should apply the official patch or update to a fixed version as soon as possible. Until patched, avoid deserializing untrusted Lambda layer configurations or invoking Lambda.from_config(config) outside of a SafeModeScope(True) context to prevent bypass of the safe-mode guard.
CVE-2026-12481: CWE-502 Deserialization of Untrusted Data in keras-team keras-team/keras
Description
CVE-2026-12481 is a high-severity vulnerability in keras-team/keras version 3.14.0 involving unsafe deserialization in the Lambda layer. The issue arises because the function _raise_for_lambda_deserialization() does not enforce the safe-mode guard when safe_mode is None, the default outside a SafeModeScope context. This allows attacker-controlled marshal bytecode to be deserialized, potentially leading to arbitrary OS-level code execution. The vulnerability affects deserialization calls such as keras.layers.deserialize(config), keras.models.clone_model(model), and Lambda.from_config(config) without SafeModeScope(True).
CVSS v3.0
Score 8.8high
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability in keras-team/keras version 3.14.0 stems from improper handling of deserialization in the Lambda layer. Specifically, the _raise_for_lambda_deserialization() function conflates None (default deny) with False (explicitly disabled) for the safe_mode parameter, bypassing the safe-mode guard. Consequently, attacker-controlled marshal bytecode can be deserialized, enabling arbitrary code execution at the OS level within the server or user process context. Affected call sites include keras.layers.deserialize(config), keras.models.clone_model(model), and direct calls to Lambda.from_config(config) without an enclosing SafeModeScope(True). This is a CWE-502 deserialization of untrusted data vulnerability with a CVSS 3.0 score of 8.8 (high severity).
Potential Impact
Successful exploitation allows an attacker to execute arbitrary operating system-level code in the context of the server or user process running keras. This can lead to full compromise of the affected system, including data theft, service disruption, or further attacks.
Mitigation Recommendations
The vendor manages remediation for this cloud-hosted service and a patch is available. Users should apply the official patch or update to a fixed version as soon as possible. Until patched, avoid deserializing untrusted Lambda layer configurations or invoking Lambda.from_config(config) outside of a SafeModeScope(True) context to prevent bypass of the safe-mode guard.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- @huntr_ai
- Date Reserved
- 2026-06-17T01:06:48.759Z
- Cvss Version
- 3.0
- State
- PUBLISHED
- Remediation Level
- null
- Is Cloud Service
- true
Threat ID: 6a4820fb27e9c79719acbf00
Added to database: 07/03/2026, 20:52:11 UTC
Last enriched: 07/03/2026, 20:59:25 UTC
Last updated: 07/04/2026, 01:58:56 UTC
Views: 17
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.