9.8

CVE-2026-12481: keras-team keras-team/keras Deserialization of Untrusted Data

CVSS: 9.8v3.1CriticalAnalyzed
AliasesGHSA-5gwj-m78q-7pq3PYSEC-2026-3631UBUNTU-CVE-2026-12481
Published 03-07-2026Last modified 06-07-2026

Vulnerability summary

CVE-2026-12481 is a critical (CVSS 9.8) Deserialization of Untrusted Data vulnerability in keras-team keras-team/keras. EPSS estimates a 0.72% chance of exploitation in the next 30 days, higher than 53% of scored vulnerabilities. 1 public exploit is recorded.

Overall risk
70/100
0100
High · default modelHow is this calculated?
CVSS score
9.8/10
010
Critical · v3.1 (NVD)
EPSS score
0.72%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits1reference

Timeline

  1. 03-07-2026
    PublishedVulnerability first disclosed.
  2. 06-07-2026
    Last modifiedVulnerability information updated.

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.

CVSS metrics

7 scores · 5 sources · 2 versions

EPSS trend

Probability

0.72%

Chance of exploitation in the next 30 days

Percentile

53%

Versus all other CVEs

30-day change

0.00 pp

From 0.72% on 19-09-2026

19-09-202619-10-2026
EPSS score
0.72%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

1 found
  • referenceUnverified

    Exploit Reference (huntr.com)

    Maturity: unknown

Weaknesses

CWE · root cause

Affected systems

Debian1 product
  • kerasAll versions (No fix recorded)
Keras1 product
Keras-team1 product
PyPI1 product
  • keras< 3.12.3 | ≥ 3.13.0, < 3.15.0
Ubuntu1 product
  • kerasAll versions (No fix recorded)

5 vendors · 5 products

References

14 links
Show all 14 references