Skip to main content
HIGH

CVE-2026-12481

CVSS v3

8.8

HIGH

EPSS Score

0.7 %

exploit probability, as of 2026-10-17

CISA KEV

No

known exploited

Exploitation

—

SSVC status

Get an alert for each new CVE published for keras. Watch keras in CVE Watch Free account · no credit card

Affected and fixed versions

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • kerasPyPIall versions · fixed in 3.12.3

Vendor advisories

  • CVE-2026-12481 Red Hat Product Security4 products fixed · 1 known affected

    keras: Keras: Arbitrary code execution via deserialization vulnerability

    rhoai/odh-modelmesh-runtime-adapter-rhel9 as a component of Red Hat OpenShift AI (RHOAI)

  • RHSA-2026:60520 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: RHOAI 3.4.4 - Red Hat OpenShift AI

Full record on NVD

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.

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
2026-07-03
Last Modified
2026-07-03

Frequently asked questions

What is CVE-2026-12481?

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.

Is CVE-2026-12481 actively exploited?

Active exploitation of CVE-2026-12481 has not been confirmed. Its EPSS score was 0.7% on 2026-10-17, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2026-12481?

CVE-2026-12481 has a CVSS v3 base score of 8.8 (HIGH severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

Running keras? Hear about its next vulnerability

CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.

Already have an account? Open CVE WatchNo credit card required · 50 free checks/month · Free API key