{"id":"CVE-2025-1550","aliases":["AZL-58360","GHSA-48g7-3x6r-xfhp","PYSEC-2025-122","UBUNTU-CVE-2025-1550"],"summary":"Arbitrary Code Execution via Crafted Keras Config for Model Loading","published_at":"2025-03-11T08:12:34.974Z","modified_at":"2026-11-19T05:26:20Z","products":[],"rating":{"severity":"critical","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","attack_path":"internet_unauthenticated","user_interaction":false,"malicious":false,"red_hat":"Important","vendor_ratings":[{"source":"Ubuntu","rating":"medium"},{"source":"Red Hat","rating":"Important"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":true,"exploits":[{"source":"exploit-db","id":"EDB-52359","name":"Keras 2.15 - Remote Code Execution (RCE)","url":"https://www.exploit-db.com/exploits/52359","published":"2025-07-16","verified":false}],"epss":{"score":0.026040000841021538,"percentile":0.8570700287818909,"date":"2026-11-19T00:00:00Z"},"priority":12.55,"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.","affected_stack":[],"affected_other":[{"ecosystem":"Azure Linux:3","package":"keras","purl":"pkg:rpm/azure-linux/keras","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.3.3-2"}]}],"fixed":["3.3.3-2"],"provider":"osv","source":"AZL-58360","relation":"self"},{"ecosystem":"CVE","package":"Google/Keras","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.8.0"}]}],"fixed":["3.8.0"],"provider":"cvelistv5","source":"CVE-2025-1550","relation":"self"},{"ecosystem":"NVD","package":"keras:keras","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.8.0"}]}],"fixed":["3.8.0"],"provider":"nvd","source":"CVE-2025-1550","relation":"self"},{"ecosystem":"PyPI","package":"keras","purl":"pkg:pypi/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"],"fixed":["3.9.0"],"provider":"osv","source":"GHSA-48g7-3x6r-xfhp","relation":"self"},{"ecosystem":"PyPI","package":"keras","purl":"pkg:pypi/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"],"fixed":["3.8.0"],"provider":"osv","source":"PYSEC-2025-122","relation":"self"},{"ecosystem":"Ubuntu:18.04:LTS","package":"keras","purl":"pkg:deb/ubuntu/keras?arch=source&distro=bionic","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.7-2","2.1.1-1"],"provider":"osv","source":"UBUNTU-CVE-2025-1550","relation":"self"},{"ecosystem":"Ubuntu:20.04:LTS","package":"keras","purl":"pkg:deb/ubuntu/keras?arch=source&distro=focal","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.2.4-1"],"provider":"osv","source":"UBUNTU-CVE-2025-1550","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","cpe":"cpe:/a:redhat:openshift_ai","status":"not_affected","packages":["rhoai/odh-ml-pipelines-api-server-v2-rhel8","rhoai/odh-ml-pipelines-driver-rhel8","rhoai/odh-ml-pipelines-launcher-rhel8","rhoai/odh-ml-pipelines-persistenceagent-v2-rhel8","rhoai/odh-ml-pipelines-scheduledworkflow-v2-rhel8","rhoai/odh-modelmesh-runtime-adapter-rhel8"],"package_count":6,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2025-1550"}],"records":[{"provider":"cvelistv5","source_id":"CVE-2025-1550","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2025-1550","license":"CC-BY-4.0","published_at":"2025-03-11T08:12:34.974Z","modified_at":"2025-07-24T15:28:42.23Z","summary":"Arbitrary Code Execution via Crafted Keras Config for Model Loading","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.","severity":[{"type":"CVSS_V4","score":"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","source":"CVE-2025-1550"}],"affected":[{"ecosystem":"CVE","package":"Google/Keras","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.8.0"}]}],"fixed":["3.8.0"],"provider":"cvelistv5","source":"CVE-2025-1550","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/keras-team/keras/pull/20751"},{"type":"WEB","url":"https://towerofhanoi.it/writeups/cve-2025-1550/"}]},{"provider":"nvd","source_id":"CVE-2025-1550","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-1550","severity":[],"affected":[{"ecosystem":"NVD","package":"keras:keras","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.8.0"}]}],"fixed":["3.8.0"],"provider":"nvd","source":"CVE-2025-1550","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"AZL-58360","relation":"self","url":"https://osv.dev/vulnerability/AZL-58360","license":"MIT","published_at":"2025-03-11T09:15:25Z","modified_at":"2026-11-19T05:26:20Z","summary":"CVE-2025-1550 affecting package keras for versions less than 3.3.3-2","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.","severity":[],"affected":[{"ecosystem":"Azure Linux:3","package":"keras","purl":"pkg:rpm/azure-linux/keras","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.3.3-2"}]}],"fixed":["3.3.3-2"],"provider":"osv","source":"AZL-58360","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-1550"}]},{"provider":"osv","source_id":"GHSA-48g7-3x6r-xfhp","relation":"self","url":"https://osv.dev/vulnerability/GHSA-48g7-3x6r-xfhp","license":"CC-BY-4.0","published_at":"2025-03-11T20:07:32Z","modified_at":"2026-09-10T03:50:56.790604Z","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","severity":[{"type":"CVSS_V4","score":"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","source":"GHSA-48g7-3x6r-xfhp"}],"affected":[{"ecosystem":"PyPI","package":"keras","purl":"pkg:pypi/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"],"fixed":["3.9.0"],"provider":"osv","source":"GHSA-48g7-3x6r-xfhp","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/keras-team/keras/security/advisories/GHSA-48g7-3x6r-xfhp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-1550"},{"type":"WEB","url":"https://github.com/keras-team/keras/pull/20751"},{"type":"WEB","url":"https://github.com/keras-team/keras/commit/e67ac8ffd0c883bec68eb65bb52340c7f9d3a903"},{"type":"PACKAGE","url":"https://github.com/keras-team/keras"},{"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"}]},{"provider":"osv","source_id":"PYSEC-2025-122","relation":"self","url":"https://osv.dev/vulnerability/PYSEC-2025-122","license":"CC-BY-4.0","published_at":"2025-03-11T09:15:25.217Z","modified_at":"2026-06-10T17:01:53.711341Z","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.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"PYSEC-2025-122"}],"affected":[{"ecosystem":"PyPI","package":"keras","purl":"pkg:pypi/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"],"fixed":["3.8.0"],"provider":"osv","source":"PYSEC-2025-122","relation":"self"}],"product_status":[],"references":[{"type":"FIX","url":"https://github.com/keras-team/keras/pull/20751"},{"type":"EVIDENCE","url":"https://towerofhanoi.it/writeups/cve-2025-1550/"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-48g7-3x6r-xfhp"}]},{"provider":"osv","source_id":"UBUNTU-CVE-2025-1550","relation":"self","url":"https://osv.dev/vulnerability/UBUNTU-CVE-2025-1550","license":"CC-BY-SA-4.0","published_at":"2025-03-11T09:15:00Z","modified_at":"2026-11-11T09:38:43.546585Z","withdrawn_at":"2026-11-10T05:46:38Z","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.","severity":[{"type":"CVSS_V4","score":"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","source":"UBUNTU-CVE-2025-1550"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"UBUNTU-CVE-2025-1550"},{"type":"Ubuntu","score":"medium","source":"UBUNTU-CVE-2025-1550"}],"affected":[{"ecosystem":"Ubuntu:18.04:LTS","package":"keras","purl":"pkg:deb/ubuntu/keras?arch=source&distro=bionic","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.7-2","2.1.1-1"],"provider":"osv","source":"UBUNTU-CVE-2025-1550","relation":"self"},{"ecosystem":"Ubuntu:20.04:LTS","package":"keras","purl":"pkg:deb/ubuntu/keras?arch=source&distro=focal","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.2.4-1"],"provider":"osv","source":"UBUNTU-CVE-2025-1550","relation":"self"}],"product_status":[],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2025-1550"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2025-1550"},{"type":"REPORT","url":"https://github.com/keras-team/keras/security/advisories/GHSA-48g7-3x6r-xfhp"},{"type":"REPORT","url":"https://github.com/keras-team/keras/pull/20751"}]},{"provider":"redhat-vex","source_id":"CVE-2025-1550","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2025-1550","license":"CC-BY-4.0","published_at":"2025-03-11T08:12:34.974Z","modified_at":"2025-07-31T17:00:23Z","summary":"keras: Arbitrary Code Execution via Crafted Keras Config for Model Loading","details":"A flaw was found in Keras. This vulnerability allows arbitrary code execution via a maliciously crafted .keras archive that manipulates the config.json file to load and execute arbitrary Python modules and functions, even with safe_mode=True.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","source":"CVE-2025-1550"},{"type":"Red Hat","score":"Important","source":"CVE-2025-1550"}],"affected":[],"product_status":[{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","cpe":"cpe:/a:redhat:openshift_ai","status":"not_affected","packages":["rhoai/odh-ml-pipelines-api-server-v2-rhel8","rhoai/odh-ml-pipelines-driver-rhel8","rhoai/odh-ml-pipelines-launcher-rhel8","rhoai/odh-ml-pipelines-persistenceagent-v2-rhel8","rhoai/odh-ml-pipelines-scheduledworkflow-v2-rhel8","rhoai/odh-modelmesh-runtime-adapter-rhel8"],"package_count":6,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2025-1550"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-1550.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2025-1550"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2351304"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2025-1550"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-1550"},{"type":"WEB","url":"https://github.com/keras-team/keras/pull/20751"}]}],"references":[{"type":"WEB","url":"https://github.com/keras-team/keras/pull/20751"},{"type":"WEB","url":"https://towerofhanoi.it/writeups/cve-2025-1550/"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-1550"},{"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":"PACKAGE","url":"https://github.com/keras-team/keras"},{"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"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-48g7-3x6r-xfhp"},{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2025-1550"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2025-1550"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-1550.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2025-1550"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2351304"}],"sources":[{"provider":"cvelistv5","source_id":"CVE-2025-1550","url":"https://www.cve.org/CVERecord?id=CVE-2025-1550","license":"CC-BY-4.0","modified_at":"2025-07-24T15:28:42.23Z","relation":"self"},{"provider":"nvd","source_id":"CVE-2025-1550","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-1550","relation":"self"},{"provider":"osv","source_id":"AZL-58360","url":"https://osv.dev/vulnerability/AZL-58360","license":"MIT","modified_at":"2026-11-19T05:26:20Z","relation":"self"},{"provider":"osv","source_id":"GHSA-48g7-3x6r-xfhp","url":"https://osv.dev/vulnerability/GHSA-48g7-3x6r-xfhp","license":"CC-BY-4.0","modified_at":"2026-09-10T03:50:56.790604Z","relation":"self"},{"provider":"osv","source_id":"PYSEC-2025-122","url":"https://osv.dev/vulnerability/PYSEC-2025-122","license":"CC-BY-4.0","modified_at":"2026-06-10T17:01:53.711341Z","relation":"self"},{"provider":"osv","source_id":"UBUNTU-CVE-2025-1550","url":"https://osv.dev/vulnerability/UBUNTU-CVE-2025-1550","license":"CC-BY-SA-4.0","modified_at":"2026-11-11T09:38:43.546585Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2025-1550","url":"https://access.redhat.com/security/cve/CVE-2025-1550","license":"CC-BY-4.0","modified_at":"2025-07-31T17:00:23Z","relation":"self"}]}
