{
  "threat_severity" : "Important",
  "public_date" : "2025-09-19T08:16:44Z",
  "bugzilla" : {
    "description" : "keras: Arbitary Code execution in Keras load_model()",
    "id" : "2396645",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2396645"
  },
  "cvss3" : {
    "cvss3_base_score" : "8.6",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-913",
  "details" : [ "The Keras Model.load_model method can be exploited to achieve arbitrary code execution, even with safe_mode=True.\nOne can create a specially crafted .h5/.hdf5 model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed.\nThis is achieved by crafting a special .h5 archive file that uses the Lambda layer feature of keras which allows arbitrary Python code in the form of pickled code. The vulnerability comes from the fact that the safe_mode=True option is not honored when reading .h5 archives.\nNote that the .h5/.hdf5 format is a legacy format supported by Keras 3 for backwards compatibility.", "A code injection flaw has been discovered in the Keras python module. One can create a specially crafted .h5/.hdf5 model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed. This is achieved by crafting a special .h5 archive file that uses the Lambda layer feature of keras which allows arbitrary Python code in the form of pickled code. The vulnerability comes from the fact that the safe_mode=True option is not honored when reading .h5 archives." ],
  "affected_release" : [ {
    "product_name" : "Red Hat OpenShift AI 2.22",
    "release_date" : "2025-12-04T00:00:00Z",
    "advisory" : "RHSA-2025:22759",
    "cpe" : "cpe:/a:redhat:openshift_ai:2.22::el9",
    "package" : "rhoai/odh-modelmesh-runtime-adapter-rhel9:sha256:1dd295d8062d8846ffb2534b2597e2791bd67387904b3d4ccf58cf3424d3250b"
  }, {
    "product_name" : "Red Hat OpenShift AI 2.25",
    "release_date" : "2025-12-17T00:00:00Z",
    "advisory" : "RHSA-2025:23531",
    "cpe" : "cpe:/a:redhat:openshift_ai:2.25::el9",
    "package" : "rhoai/odh-modelmesh-runtime-adapter-rhel9:sha256:4c4960f59045736201fef76a709ea63432f3dfc006a1e036b9a36731474552fa"
  } ],
  "package_state" : [ {
    "product_name" : "Red Hat OpenShift AI (RHOAI)",
    "fix_state" : "Will not fix",
    "package_name" : "rhoai/odh-modelmesh-runtime-adapter-rhel8",
    "cpe" : "cpe:/a:redhat:openshift_ai"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2025-9905\nhttps://nvd.nist.gov/vuln/detail/CVE-2025-9905\nhttps://github.com/keras-team/keras/pull/21602\nhttps://github.com/keras-team/keras/security/advisories/GHSA-36rr-ww3j-vrjv" ],
  "name" : "CVE-2025-9905",
  "mitigation" : {
    "value" : "Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.",
    "lang" : "en:us"
  },
  "csaw" : false
}