9.8

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

Analyzed
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.47% chance of exploitation in the next 30 days, higher than 42.1% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Prioritisepublic exploit

Public exploit (reference, Date unknown)

Source freshness unavailable

How is this decided?
CVSS score
9.8/10
010
Critical · v3.1 (NVD)
EPSS score
0.47%
0%100%
Low · -0.25 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware 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.47%

Chance of exploitation in the next 30 days

Percentile

42%

Versus all other CVEs

30-day change

Decrease -0.25 pp

From 0.72% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • referenceUnverified

    Exploit Reference (huntr.com)

    Maturity: unknown

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.

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