CVE-2026-12570: Keras Denial of Service Vulnerability
MODERATECVE-2026-12570 is a MODERATE (CVSS 5.5) denial of service vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Keras libraries in the PyPI ecosystem. The issue involves keras model loading is vulnerable to denial of service through hdf5 shape bombs. Remediation is available by upgrading affected packages to version 3.15.0.
CVE-2026-12570 at a Glance
Security Impact
CVSS: 5.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-12570
To remediate this vulnerability, upgrade all affected Keras dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install keras>=3.15.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show keras
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-12570, inspect your installed packages using pip:
pip show keras
Analyze the terminal output to locate any version of Keras in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.15.0), your application is affected.
Note: The pip show keras command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Keras, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-12570 Affected Keras Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
keras
|
PyPI |
< 3.15.0
|
3.15.0
|
References
Frequently Asked Questions
What is CVE-2026-12570?
Which Keras versions are affected?
What version fixes CVE-2026-12570?
Is keras affected?
What is the CVSS score of CVE-2026-12570?
What CWE is associated with CVE-2026-12570?
How can I check PyPI dependencies for CVE-2026-12570?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-74m6-m3xx-3vmj",
"modified" : "2026-09-01T20:22:06Z",
"published" : "2026-08-10T09:31:20Z",
"aliases" : [ "CVE-2026-12570" ],
"summary" : "Keras model loading is vulnerable to denial of service through HDF5 shape bombs",
"details" : "A vulnerability in keras-team/keras versions < 3.15.0 allows for a denial of service (DoS) attack when loading malicious .keras model files via the keras.models.load_model() function. The H5IOStore.__getitem__ method in keras/src/saving/saving_lib.py does not validate the shape or size of datasets, leading to unbounded memory allocation. A specially crafted .keras file can exploit this flaw to trigger an out-of-memory (OOM) condition, causing the process to be terminated (exit code 137). This issue bypasses the fix for CVE-2026-0897, which only addressed a similar vulnerability in KerasFileEditor. The attack vector includes poisoned models from public repositories or malicious model registries, posing a risk to machine learning pipelines that process untrusted models.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "keras"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.15.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-12570"
}, {
"type" : "WEB",
"url" : "https://github.com/keras-team/keras/pull/22975"
}, {
"type" : "WEB",
"url" : "https://github.com/keras-team/keras/commit/4933ea4a5b3fcc24ceacdc276f5bb5dfbd06756c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/keras-team/keras"
}, {
"type" : "WEB",
"url" : "https://github.com/keras-team/keras/releases/tag/v3.15.0"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/a064f475-780a-409a-82f7-678512f27ad8"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-01T20:22:06Z",
"nvd_published_at" : "2026-08-10T07:16:44Z"
}
}