{"id":"CVE-2025-1550","aliases":["GHSA-48g7-3x6r-xfhp","PYSEC-2025-122"],"url":"https://o3.security/vulnerability/CVE-2025-1550","summary":"Arbitrary Code Execution via Crafted Keras Config for Model Loading","details":"### Impact\n\nThe 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.\n\n### Patches\n\nThis problem is fixed starting with version `3.9`.\n\n### Workarounds\n\nOnly load models from trusted sources and model archives created with Keras.\n\n### References\n\n- https://www.cve.org/cverecord?id=CVE-2025-1550\n- https://github.com/keras-team/keras/pull/20751","published":"2025-03-11T08:12:34.974Z","modified":"2026-08-12T03:51:22.008974417Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"PyPI","name":"keras","fixedVersion":"3.9.0"}],"fix":{"url":"https://github.com/keras-team/keras/pull/20751","label":"keras-team/keras#20751"},"references":[{"type":"WEB","url":"https://towerofhanoi.it/writeups/cve-2025-1550/"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/1xxx/CVE-2025-1550.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-1550"},{"type":"FIX","url":"https://github.com/keras-team/keras/pull/20751"},{"type":"PACKAGE","url":"https://github.com/keras-team/keras"},{"type":"PACKAGE","url":"https://pypi.org/project/keras"},{"type":"WEB","url":"https://github.com/keras-team/keras/security/advisories/GHSA-48g7-3x6r-xfhp"},{"type":"WEB","url":"https://github.com/keras-team/keras/commit/e67ac8ffd0c883bec68eb65bb52340c7f9d3a903"},{"type":"WEB","url":"https://github.com/keras-team/keras/releases/tag/v3.9.0"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/keras/PYSEC-2025-122.yaml"},{"type":"WEB","url":"https://towerofhanoi.it/writeups/cve-2025-1550"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:22.008974417Z"}}