{
  "threat_severity" : "Important",
  "public_date" : "2025-09-19T08:15:04Z",
  "bugzilla" : {
    "description" : "keras: Arbitrary Code execution in Keras Safe Mode",
    "id" : "2396644",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2396644"
  },
  "cvss3" : {
    "cvss3_base_score" : "8.2",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-502",
  "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 .keras model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed. This is achieved by crafting a special config.json (a file within the .keras archive) that will invoke keras.config.enable_unsafe_deserialization() to disable safe mode. Once safe mode is disable, one can use the Lambda layer feature of keras, which allows arbitrary Python code in the form of pickled code. Both can appear in the same archive. Simply the keras.config.enable_unsafe_deserialization() needs to appear first in the archive and the Lambda with arbitrary code needs to be second.", "A code injection flaw has been discovered in the Keras python library. One can create a specially crafted .keras model archive that, when loaded via Model.load_model, will trigger arbitrary code to be executed. This is achieved by crafting a special config.json (a file within the .keras archive) that will invoke keras.config.enable_unsafe_deserialization() to disable safe mode." ],
  "affected_release" : [ {
    "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-9906\nhttps://nvd.nist.gov/vuln/detail/CVE-2025-9906\nhttps://github.com/keras-team/keras/pull/21429" ],
  "name" : "CVE-2025-9906",
  "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
}