Skip to main content

Keras EUVDEUVD-2026-21970

| CVE-2026-1462 HIGH
Deserialization of Untrusted Data (CWE-502)
2026-04-13 @huntr_ai GHSA-4f3f-g24h-fr8m
7.8
CVSS 3.1 · Vendor: huntr_ai
Share

Severity by source

Vendor (huntr_ai) PRIMARY
7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI
7.8 HIGH

Local because a victim must load the crafted model (AV:L, UI:R); no prior privileges needed (PR:N); deserialized code grants full host impact, so C/I/A all High.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Red Hat
7.8 HIGH
qualitative

Primary rating from Vendor (huntr_ai).

CVSS VectorVendor: huntr_ai

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

12
Analysis Updated
Jun 30, 2026 - 04:37 vuln.today
v5 (cvss_changed)
Analysis Updated
Jun 30, 2026 - 04:37 vuln.today
v4 (cvss_changed)
Source Code Evidence Fetched
Jun 30, 2026 - 04:36 vuln.today
Analysis Updated
Jun 30, 2026 - 04:36 vuln.today
v3 (cvss_changed)
Analysis Updated
Jun 30, 2026 - 04:36 vuln.today
v2 (cvss_changed)
CVSS changed
Jun 30, 2026 - 03:24 NVD
8.8 (HIGH) 7.8 (HIGH)
Re-analysis Queued
Apr 17, 2026 - 15:37 vuln.today
cvss_changed
Patch released
Apr 15, 2026 - 02:30 nvd
Patch available
Analysis Generated
Apr 13, 2026 - 15:39 vuln.today
EUVD ID Assigned
Apr 13, 2026 - 15:15 euvd
EUVD-2026-21970
Analysis Generated
Apr 13, 2026 - 15:15 vuln.today
CVE Published
Apr 13, 2026 - 14:55 nvd
HIGH 8.8

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 7 pypi packages depend on keras (5 direct, 2 indirect)

Ecosystem-wide dependent count for version 3.13.2.

DescriptionCVE.org

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.

AnalysisAI

Arbitrary code execution in Keras 3.13.0 occurs because the TFSMLayer class unconditionally loads attacker-supplied TensorFlow SavedModels while deserializing a .keras model, even with safe_mode=True engaged. Any user who loads a malicious model triggers attacker-controlled code at inference time under their own privileges, defeating the protection safe_mode is supposed to provide. The flaw (CWE-502) has publicly available exploit code via huntr but is not in CISA KEV; EPSS is very low at 0.06% (19th percentile), consistent with the local, user-interaction-dependent attack path.

Technical ContextAI

Keras is a high-level deep-learning API (here the standalone keras-team/keras 3.x stack on TensorFlow) whose native .keras archive format supports layer reconstruction via from_config(). The TFSMLayer wraps a TensorFlow SavedModel directory so a saved Graph can be reused as a Keras layer. The root cause is a classic CWE-502 deserialization-of-untrusted-data flaw: from_config() serializes and trusts an attacker-controlled filesystem path and unconditionally loads the referenced external SavedModel, with no validation and no enforcement of the safe_mode gate that normally blocks Lambda/arbitrary-callable deserialization. Because a SavedModel can embed arbitrary TensorFlow ops/custom code that execute when the graph runs, loading the crafted model results in code execution during inference. CPE cpe:2.3:a:keras-team:keras-team/keras identifies the affected component as the keras-team Keras package specifically.

RemediationAI

Primary fix: upgrade Keras to 3.13.2 or later, which contains the upstream fix (commit b6773d3decaef1b05d8e794458e148cb362f163f); the EUVD affected range (<3.13.2) confirms 3.13.2 as the patched line. Red Hat users should apply the platform errata RHSA-2026:24977. Until patched, treat all .keras model files as untrusted code: do not load models from untrusted or unverified sources, and avoid relying on safe_mode=True as a security boundary since this flaw bypasses it. As compensating controls, load untrusted models only inside a sandboxed/isolated environment (container with no network egress and least-privilege filesystem access) so any executed payload is contained - at the cost of added pipeline complexity; and where feasible avoid using TFSMLayer to wrap externally-supplied SavedModels, and validate the provenance/integrity (signing/hashes) of model artifacts before deserialization. Advisory and patch URLs: https://github.com/keras-team/keras/commit/b6773d3decaef1b05d8e794458e148cb362f163f and https://access.redhat.com/errata/RHSA-2026:24977.

Vendor StatusVendor

Share

EUVD-2026-21970 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy