CVE-2026-1462: Safe Mode Bypass in keras-team/keras
A vulnerability in the `TFSMLayer` class of the `keras` package, version 3.13.0, allows attacker-controlled TensorFlow SavedModels to be loaded during deserialization of `.keras` models, even when `safe_mode=True`. This bypasses the security guarantees of `safe_mode` and enables arbitrary attacker-controlled code execution during model inference under the victim's privileges. The issue arises due to the unconditional loading of external SavedModels, serialization of attacker-controlled file paths, and the lack of validation in the `from_config()` method.
Security readout for executives and security teams
Plain-English summary
Keras safe_mode can be bypassed when a crafted .keras model causes TFSMLayer to load an external TensorFlow SavedModel. If a victim loads and runs an attacker-supplied model, code may execute with the victim process privileges.
Executive priority
Treat as high priority for teams accepting external ML models. The business risk is unauthorized code execution inside ML workloads, but exploitation depends on model ingestion behavior.
Technical view
CVE-2026-1462 is a CWE-502 deserialization flaw in keras TFSMLayer version 3.13.0. from_config() unconditionally loads serialized external SavedModel paths without sufficient validation, undermining safe_mode=True and allowing attacker-controlled code execution during inference.
Likely exposure
Highest exposure is in ML platforms, notebooks, CI pipelines, model registries, or applications that import third-party .keras models or SavedModels. Systems using only internally produced, trusted models have lower practical exposure.
Exploitation context
The CVSS vector requires user interaction: a victim must load a malicious model artifact. KEV is false, and the provided sources do not establish active exploitation in the wild.
Researcher notes
The bundle names Keras 3.13.0 and includes an upstream commit, but no fixed release number is provided. Validate fixes against official Keras or vendor packaging rather than assuming all later versions are patched.
Mitigation direction
Do not load untrusted .keras models or SavedModels.
Upgrade to a Keras release or vendor package containing the referenced fix.
Apply relevant Red Hat errata where applicable.
Restrict model ingestion to trusted, authenticated registries.
Run model loading and inference in isolated, least-privileged environments.
Validation and detection
Inventory systems using keras, especially version 3.13.0.
Identify workflows that deserialize .keras models from external sources.
Review use of TFSMLayer and TensorFlow SavedModel imports.
Confirm safe_mode is not the only control for untrusted models.
Verify applicable upstream commit or vendor errata is present.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-502: Code execution behavior lookup
Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
5Timeline events
2ADP providers
8Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-502 · source CWE mapping
Deserialization of Untrusted Data
Deserialization of Untrusted Data represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.