PYSEC-2025-122

See a problem?
Import Source
https://github.com/pypa/advisory-database/blob/main/vulns/keras/PYSEC-2025-122.yaml
JSON Data
https://api.osv.dev/v1/vulns/PYSEC-2025-122
Aliases
Published
2025-03-11T09:15:25Z
Modified
2026-06-10T17:01:53Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

The Keras Model.load_model function permits arbitrary code execution, even with safe_mode=True, through a manually constructed, malicious .keras archive. By altering the config.json file within the archive, an attacker can specify arbitrary Python modules and functions, along with their arguments, to be loaded and executed during model loading.

References

Affected packages

PyPI / keras

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.0.0
Fixed
3.8.0

Affected versions

3.*
3.0.0
3.0.1
3.0.2
3.0.3
3.0.4
3.0.5
3.1.0
3.1.1
3.2.0
3.2.1
3.3.0
3.3.1
3.3.2
3.3.3
3.4.0
3.4.1
3.5.0
3.6.0
3.7.0

Database specific

source
"https://github.com/pypa/advisory-database/blob/main/vulns/keras/PYSEC-2025-122.yaml"