{"id":"CVE-2025-1550","aliases":["AZL-58360","EUVD-2025-7406","GHSA-48g7-3x6r-xfhp","PYSEC-2025-122","UBUNTU-CVE-2025-1550"],"status":"published","title":"Arbitrary Code Execution via Crafted Keras Config for Model Loading","description":"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.","severity":{"version":"4.0","score":7.3,"vector":"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","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.02604,"percentile":0.85505,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-94"],"published":"2025-03-11T08:12:34Z","modified":"2026-11-05T05:40:51Z","exploits":[{"source":"exploitdb","id":"EDB-52359","title":"Keras 2.15 - Remote Code Execution (RCE)","type":"remote","platform":"python","date":"2025-07-16","url":"https://www.exploit-db.com/exploits/52359"},{"source":"pocgithub","id":"ChCh0i/cve-2025-1550","title":"ChCh0i/cve-2025-1550","date":"2025-10-24","url":"https://github.com/ChCh0i/cve-2025-1550"}],"fixes":[{"ecosystem":"PyPI","package":"keras","fixed_in":["3.9.0","3.8.0"],"sources":["ghsa","osv"]},{"ecosystem":"Azure Linux:3","package":"keras","fixed_in":["3.3.3-2"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"keras","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.9.0"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"keras","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.3.3-2"}]}]},{"source":"osv","ecosystem":"PyPI","package":"keras","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.9.0"}]}],"versions":["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"]},{"source":"osv","ecosystem":"PyPI","package":"keras","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.8.0"}]}],"versions":["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"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"keras","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.7-2","2.1.1-1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"keras","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.2.4-1"]}],"products":[{"vendor":"google","product":"keras"},{"vendor":"keras","product":"keras"}],"references":[{"url":"https://github.com/keras-team/keras/pull/20751","tags":["Issue Tracking","Patch","fix","web","report"]},{"url":"https://towerofhanoi.it/writeups/cve-2025-1550/","tags":["Exploit","Third Party Advisory","web","evidence"]},{"url":"https://github.com/keras-team/keras/security/advisories/GHSA-48g7-3x6r-xfhp","tags":["web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-1550","tags":["web","advisory"]},{"url":"https://github.com/keras-team/keras/commit/e67ac8ffd0c883bec68eb65bb52340c7f9d3a903","tags":["web"]},{"url":"https://github.com/keras-team/keras/releases/tag/v3.9.0","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/keras/PYSEC-2025-122.yaml","tags":["web"]},{"url":"https://towerofhanoi.it/writeups/cve-2025-1550","tags":["web"]},{"url":"https://github.com/advisories/GHSA-48g7-3x6r-xfhp","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/1xxx/CVE-2025-1550.json","tags":["advisory"]},{"url":"https://github.com/keras-team/keras","tags":["package"]},{"url":"https://pypi.org/project/keras","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2025-1550","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-1550","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2025-1550","title":"Arbitrary Code Execution via Crafted Keras Config for Model Loading","description":"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.","status":"published","published":"2025-03-11T08:12:34.974Z","modified":"2025-07-24T15:28:42.23Z","cvss":[{"version":"4.0","score":7.3,"vector":"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","level":"high","assessor":"cna"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:32:49.824855Z"}],"euvd":[{"id":"EUVD-2025-7406","description":"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.","status":"published","published":"2025-03-11T08:12:34Z","modified":"2025-07-24T15:28:42Z","cvss":[{"version":"4.0","score":7.3,"vector":"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","level":"high"}],"updated_at":"2026-11-02T20:32:04.291169Z"}],"ghsa":[{"id":"GHSA-48g7-3x6r-xfhp","title":"Arbitrary Code Execution via Crafted Keras Config for Model Loading","description":"### 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","status":"published","published":"2025-03-11T20:07:32Z","modified":"2026-06-06T00:30:37Z","cvss":[{"version":"4.0","score":7.3,"vector":"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","level":"high"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:40:18.682012Z"}],"nvd":[{"id":"CVE-2025-1550","description":"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.","status":"published","published":"2025-03-11T09:15:25.217Z","modified":"2026-06-17T08:39:21.253Z","cvss":[{"version":"4.0","score":7.3,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:10:53.93104Z"}],"osv":[{"id":"CVE-2025-1550","title":"Arbitrary Code Execution via Crafted Keras Config for Model Loading","description":"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.","status":"published","published":"2025-03-11T08:12:34.974Z","modified":"2026-10-28T02:31:07.26487519Z","cvss":[{"version":"4.0","score":7.3,"vector":"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","level":"high"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:44:46.340268Z"},{"id":"GHSA-48g7-3x6r-xfhp","title":"Arbitrary Code Execution via Crafted Keras Config for Model Loading","description":"### 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","status":"published","published":"2025-03-11T20:07:32Z","modified":"2026-09-10T03:50:56.790604392Z","cvss":[{"version":"4.0","score":7.3,"vector":"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","level":"high"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:46:36.782754Z"},{"id":"PYSEC-2025-122","description":"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.","status":"published","published":"2025-03-11T09:15:25.217Z","modified":"2026-06-10T17:01:53.711341676Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:52:54.242332Z"},{"id":"UBUNTU-CVE-2025-1550","description":"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.","status":"published","published":"2025-03-11T09:15:00Z","modified":"2025-10-24T05:16:29Z","cvss":[{"version":"4.0","score":7.3,"vector":"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","level":"high"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T16:55:20.144818Z"},{"id":"AZL-58360","title":"CVE-2025-1550 affecting package keras for versions less than 3.3.3-2","description":"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.","status":"published","published":"2025-03-11T09:15:25Z","modified":"2026-11-05T05:40:51Z","updated_at":"2026-11-05T16:41:21.162429Z"}]}}
