keras is vulnerable to Denial of Service (DoS)
58
CVE Score
Medium
Denial of Service (DoS)
Affected versions of keras guard .keras archives against decompression bombs only on the in-memory reads of config.json, model.weights.h5, and the sharded weight map. When an archive has more than three members, keras.saving.load_model builds a disk-backed DiskIOStore that extracts every ZIP member with ZipFile.extractall, with path-traversal filtering but no per-member decompression-ratio check. An attacker-added member that decompresses far beyond its stored size can therefore write hundreds of MB to GB to disk from a small archive under the default safe_mode=True, exhausting disk space and denying service. The fix adds _reject_zip_extract_bomb, which rejects members whose declared-to-stored size ratio exceeds the threshold before extraction.
Upgrade the keras library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and you load .keras model archives that contain assets from untrusted sources.
3.3.0 - 3.12.3
Fixed in 3.12.43.13.0 - 3.15.0
Fixed in 3.15.1keras is vulnerable to Denial of Service (DoS) in versions 3.3.0 - 3.12.3 and 3.13.0 - 3.15.0.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.