Skip to main content

Google Keras CVE-2026-0897

HIGH
Allocation of Resources Without Limits or Throttling (CWE-770)
2026-01-15 cve-coordination@google.com GHSA-xfhx-r7ww-5995 GHSA-mgx6-5cf9-rr43
7.1
CVSS 4.0 · Vendor: google
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft .keras archive with oversized HDF5 shape
  2. Delivery
    Deliver via model hub or upload endpoint
  3. Exploit
    Victim app loads model weights
  4. Execution
    Loader pre-allocates unbounded memory
  5. Impact
    Memory exhaustion crashes Python interpreter

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim to load a crafted .keras archive that contains a valid model.weights.h5 HDF5 file whose dataset declares an extremely large shape - i.e., the application must call Keras weight/model loading on an attacker-supplied file (UI:P passive interaction). No authentication is required to craft or deliver the file (PR:N), and no special Keras configuration is needed because the flaw is in the default HDF5 weight-loading path for affected versions 3.0.0-3.13.0. The key limiting factor is the trust boundary: systems that only load first-party, trusted models are not realistically exploitable, and the impact is confined to availability (process crash) with no code execution or data disclosure.

Impact

Signals are internally consistent and point to a real-but-bounded availability issue. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H) shows the only impact is availability - no confidentiality or integrity loss - and that exploitation requires the victim to load an attacker-supplied model (UI:P). EPSS is very low (0.03%, 8th percentile) and the CVE is not on CISA KEV, with no POC referenced, so there is no evidence of active or imminent mass exploitation. Practical risk concentrates in environments that ingest untrusted or third-party model files (model hubs, MLOps pipelines, services accepting user-uploaded models), where a single crafted archive can crash a worker. For deployments that only load first-party, trusted models the real-world risk is minimal. Overall this is a moderate-priority, patch-on-normal-cycle issue rather than an emergency, with priority rising sharply for any service that deserializes externally sourced .keras files.

Exploit ScenarioDerived

An attacker publishes a malicious .keras model to a model-sharing hub or submits it to a service that accepts user-uploaded models. When a victim or a backend worker loads the model, Keras reads the inflated tensor shape from the embedded model.weights.h5 and attempts a massive memory allocation, exhausting RAM and crashing the Python process. No public POC is referenced, and the network attack vector with low complexity means the only real prerequisite is convincing the target to load the file.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv5 – Jun 30, 2026

Memory-exhaustion denial of service in Google Keras 3.0.0 through 3.13.0 lets a remote attacker crash the Python interpreter by getting a victim to load a malicious .keras model archive. The crafted archive embeds a valid model.weights.h5 HDF5 file whose dataset declares an enormously large shape, so the weight loader attempts to allocate unbounded memory during deserialization. There is no public exploit identified at time of analysis, EPSS risk is low (0.03%), and a vendor fix is available.

Earlier versions of this analysis (4)
v4 Jun 30, 2026 - 06:12 cvss changed CVSS 7.1

Denial of service in Google Keras 3.0.0 through 3.13.0 lets a remote attacker crash the Python interpreter and exhaust host memory when a victim loads a malicious .keras model archive. The HDF5 weight-loading path trusts the dataset shape declared inside model.weights.h5 and pre-allocates memory accordingly, so a tiny crafted file declaring an enormous shape forces an unbounded allocation. EPSS is very low (0.03%, 8th percentile) and there is no public exploit identified at time of analysis, but a vendor patch (Keras PR #21880) and Red Hat errata are available.

v3 Jun 30, 2026 - 06:11 cvss changed CVSS 7.1

Memory-exhaustion denial of service in Google Keras 3.0.0 through 3.13.0 lets a remote attacker crash the Python interpreter by supplying a malicious .keras model archive. The crafted archive embeds an otherwise-valid model.weights.h5 HDF5 file whose dataset declares an enormous tensor shape, causing the weight loader to attempt an unbounded allocation when the victim loads the model. There is no public exploit identified at time of analysis, exploitation requires the victim to load the attacker-supplied file (UI:P), and EPSS is very low (0.03%), so this is an availability-only issue rather than a code-execution threat.

v2 Jun 30, 2026 - 06:11 cvss changed CVSS 7.1

Memory-exhaustion denial of service in Google Keras 3.0.0 through 3.13.0 allows a remote attacker to crash the Python interpreter by supplying a malicious .keras model archive. The crafted archive embeds a valid model.weights.h5 HDF5 file whose dataset declares an extremely large shape, causing the weight-loading routine to attempt an unbounded allocation. No public exploit identified at time of analysis; EPSS risk is low at 0.03%, and there is no evidence of active exploitation.

v1 Mar 12, 2026 - 21:54 CVSS 7.5

Keras versions up to 3.13.0 is affected by allocation of resources without limits or throttling (CVSS 7.5).

RemediationAI

Upgrade Keras to a fixed release above 3.13.0 that incorporates the upstream fix from https://github.com/keras-team/keras/pull/21880; Red Hat users should apply the platform-specific updates in RHSA-2026:3782, RHSA-2026:3713, or RHSA-2026:4271 as applicable. The upstream fix is available as a PR, so the released patched version is not independently confirmed here - verify the exact fixed version against the merged PR or your distribution's advisory before deploying. Until patched, the most effective compensating control is to stop loading untrusted .keras / model.weights.h5 files: only deserialize models from trusted, integrity-verified sources, and treat user-uploaded models as hostile. For services that must accept external models, isolate the loading step in a sandboxed subprocess or container with a hard memory cgroup limit (ulimit/RLIMIT_AS or a container memory cap) so an oversized allocation kills only that worker rather than the host - the trade-off is added latency and operational complexity per load. Validating or capping declared dataset shapes before allocation is another mitigation but requires custom pre-parsing of the HDF5 file and may reject legitimately large models.

Affected Packages

pypi keras fix: 3.12.1, 3.13.1, 3.13.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Keras is the high-level deep-learning API maintained by Google, distributed on PyPI and bundled into many ML stacks (TensorFlow, JAX, and PyTorch backends). The .keras serialization format is a ZIP archive containing the model config plus a model.weights.h5 file in the HDF5 binary format. When Keras loads weights it reads the dataset metadata from the HDF5 file - including the declared tensor shape - and pre-allocates buffers accordingly. The root cause is CWE-770 (Allocation of Resources Without Limits or Throttling): the loader trusts the attacker-controlled shape field and allocates memory proportional to it without validating it against the actual stored data or any sane upper bound, so an absurd shape forces an allocation that exhausts process memory and crashes the interpreter. The affected component is identified by CPE cpe:2.3:a:keras:keras:*:*:*:*:*:*:*:* across all platforms.

Know when Keras gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (google) PRIMARY 7.1 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 6.5 MEDIUM

Network-delivered malicious model with no auth (PR:N) but requires the victim to load it (UI:R); impact is availability-only memory exhaustion, so C:N/I:N/A:H.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 7.6 HIGH

Primary rating from Vendor (google).

CVSS VectorVendor: google

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

7
Analysis Updated
Jun 30, 2026 - 06:12 vuln.today
v5 - CVSS changed
Analysis Updated
Jun 30, 2026 - 06:12 vuln.today
v4 - CVSS changed
Analysis Updated
Jun 30, 2026 - 06:11 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 30, 2026 - 06:11 vuln.today
v2 - CVSS changed
CVSS changed
Jun 30, 2026 - 03:23 NVD
7.5 (HIGH) 7.1 (HIGH)
Patch released
Jan 23, 2026 - 18:35 nvd
Patch available
CVE Published
Jan 15, 2026 - 14:16 nvd
HIGH 7.5

DescriptionCVE.org

Allocation of Resources Without Limits or Throttling in the HDF5 weight loading component in Google Keras 3.0.0 through 3.13.0 on all platforms allows a remote attacker to cause a Denial of Service (DoS) through memory exhaustion and a crash of the Python interpreter via a crafted .keras archive containing a valid model.weights.h5 file whose dataset declares an extremely large shape.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2 pypi packages depend on keras (2 direct, 0 indirect)

Ecosystem-wide dependent count for version 3.0.0.

Executive ViewAI

Why It Matters

Google Keras versions 3.0.0 through 3.13.0 contain a denial-of-service vulnerability that allows remote attackers to crash Python interpreters by distributing malicious model files. Organizations with machine learning development teams or production ML deployments that load Keras models from untrusted sources face potential service disruption and system crashes. Immediate patching is required for any systems handling model files in development or production environments.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 92% exploitable
Prevalence
High
widely used Google deep-learning library across ML/AI stacks
Threat Intel
2
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
Medium

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

cpe:2.3:a:keras:keras:*:*:*:*:*:*:*:*

More in Keras

View all
CVE-2025-9905 HIGH POC
7.3 Sep 19

The Keras Model.load_model method can be exploited to achieve arbitrary code execution, even with safe_mode=True. Rated

CVE-2025-49655 CRITICAL
9.8 Oct 17

Deserialization of untrusted data in Keras 3.11.0 through 3.11.2 allows remote code execution when a victim loads a mali

CVE-2024-3660 CRITICAL
9.8 Apr 16

A arbitrary code injection vulnerability in TensorFlow's Keras framework (<2.13) allows attackers to execute arbitrary c

CVE-2025-12060 HIGH
8.9 Oct 30

Directory traversal in Keras through 3.11.3 allows an attacker who supplies a crafted tar archive to keras.utils.get_fil

CVE-2025-9906 HIGH
8.6 Sep 19

The Keras Model.load_model method can be exploited to achieve arbitrary code execution, even with safe_mode=True. Rated

CVE-2026-11816 HIGH
8.1 Jun 11

Path traversal in Keras archive extraction utilities prior to version 3.14.0 allows remote attackers to write files outs

CVE-2026-1669 HIGH
7.1 Feb 11

Arbitrary local file disclosure in Keras 3.0.0 through 3.13.1 allows a remote attacker to read sensitive files from a vi

CVE-2025-12058 MEDIUM
5.9 Oct 29

Keras Model.load_model fails to enforce safe_mode=True for the StringLookup layer's vocabulary path handling, so a malic

CVE-2025-8747 HIGH
8.6 Aug 11

A safe mode bypass vulnerability in the `Model.load_model` method in Keras versions 3.0.0 through 3.10.0 allows an attac

CVE-2024-55459 MEDIUM
6.5 Jan 08

An issue in keras 3.7.0 allows attackers to write arbitrary files to the user's machine via downloading a crafted tar fi

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy