GHSA-48g7-3x6r-xfhp

Suggest an improvement
Source
https://github.com/advisories/GHSA-48g7-3x6r-xfhp
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/03/GHSA-48g7-3x6r-xfhp/GHSA-48g7-3x6r-xfhp.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-48g7-3x6r-xfhp
Aliases
Published
2025-03-11T20:07:32Z
Modified
2025-03-11T20:27:01.848890Z
Severity
  • 7.3 (High) CVSS_V4 - CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H CVSS Calculator
Summary
Arbitrary Code Execution via Crafted Keras Config for Model Loading
Details

Impact

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.

Patches

This problem is fixed starting with version 3.9.

Workarounds

Only load models from trusted sources and model archives created with Keras.

References

  • https://www.cve.org/cverecord?id=CVE-2025-1550
  • https://github.com/keras-team/keras/pull/20751
Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-94"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2025-03-11T20:07:32Z"
}
References

Affected packages

PyPI / keras

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.0.0
Fixed
3.9.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
3.8.0