Skip to content
OpenAdvisories
High · 8.6 CVE-2025-8747 EUVD-2025-24127GHSA-c9rc-mg46-23w3PYSEC-2025-75

Keras safe_mode bypass allows arbitrary code execution when loading a malicious model.

Published Aug 11, 2025 · Updated Feb 26, 2026 · Assigned by Google

Description

A safe mode bypass vulnerability in the `Model.load_model` method in Keras versions 3.0.0 through 3.10.0 allows an attacker to achieve arbitrary code execution by convincing a user to load a specially crafted `.keras` model archive.

Affected products

VendorProductAffectedFixed
Google Keras 3.0.0 – ≤ 3.10.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS keras No fix yet —
Ubuntu 18.04 LTS keras No fix yet —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 keras 3.3.3-3 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI keras >= 3.0.0, < 3.11.0 3.11.0 GHSA-c9rc-mg46-23w3
PyPI keras — — PYSEC-2025-75

References