---
id: CVE-2026-1462
title: >-
  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`
summary: >-
  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 secu…
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'
cwe:
  - CWE-502
vendor: keras
product: keras
affected:
  - keras = 3.13.0
  - 'openshift_ai >= 2.25, < 2.25.7'
patched:
  - openshift_ai 2.25.7
published: '2026-04-13'
updated: '2026-07-07'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-1462'
references:
  - url: >-
      https://github.com/keras-team/keras/commit/b6773d3decaef1b05d8e794458e148cb362f163f
    label: security@huntr.dev
  - url: 'https://huntr.com/bounties/7e78d6f1-6977-4300-b595-e81bdbda331c'
    label: security@huntr.dev
  - url: 'https://access.redhat.com/errata/RHSA-2026:24977'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: 'https://access.redhat.com/security/cve/CVE-2026-1462'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2457856'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-1462.json
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-1462'
  - url: 'https://github.com/keras-team/keras/pull/22035'
  - url: 'https://github.com/keras-team/keras'
tags:
  - nvd
  - osv
  - pip
epss: 0.00405
epssPercentile: 0.31917
ingestedAt: '2026-07-07T18:42:24.224Z'
aliases:
  - GHSA-4f3f-g24h-fr8m
  - PYSEC-2026-2547
ecosystem: pip
scores:
  nvd: 7.8
  osv: 8.8
---

## Overview

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.

## Affected

- `keras = 3.13.0`
- `openshift_ai >= 2.25, < 2.25.7`

## Remediation

Upgrade past the affected range:

- `openshift_ai 2.25.7`

## Package advisory (CVE-2026-1462)

Affected packages:

- `keras < 3.13.2`

Patched in:

- `keras 3.13.2`

Source: https://osv.dev/vulnerability/GHSA-4f3f-g24h-fr8m
