{
  "id": "CVE-2026-12481",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-12481",
  "published_at": "2026-07-03T20:36:05.003Z",
  "title": "Deserialization of Untrusted Data in keras-team/keras",
  "vendor": "keras-team",
  "product": "keras-team/keras",
  "cvss": {
    "score": 9.8,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "A vulnerability in keras-team/keras version 3.14.0 allows for arbitrary code execution due to improper handling of deserialization in the `Lambda` layer. Specifically, the `_raise_for_lambda_deserialization()` function fails to enforce the safe-mode guard when `safe_mode` is set to `None`, which is the default value when `from_config()` is called outside of a `SafeModeScope` context. This logic error conflates `None` (unset/default-deny) with `False` (explicitly disabled), bypassing the guard and allowing attacker-controlled `marshal` bytecode to be deserialized. Affected call sites include `keras.layers.deserialize(config)`, `keras.models.clone_model(model)`, and any direct invocation of `Lambda.from_config(config)` without an enclosing `SafeModeScope(True)`. This vulnerability can be exploited to achieve arbitrary OS-level code execution in the context of the server or user process.",
  "cwe": "CWE-502",
  "cpes": [
    "cpe:2.3:a:keras:keras:3.14.0:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 8.8,
    "nvd": 9.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "keras-team",
        "product": "keras-team/keras",
        "ranges": [
          "\u003e= unspecified, \u003c= latest"
        ],
        "fixed_in": null
      },
      {
        "vendor": "",
        "product": "keras",
        "ranges": [
          "\u003c 3.12.3"
        ],
        "fixed_in": [
          "3.12.3"
        ],
        "ecosystem": "PyPI",
        "advisory": "GHSA-5gwj-m78q-7pq3"
      },
      {
        "vendor": "",
        "product": "keras",
        "ranges": [
          "\u003e= 3.13.0, \u003c 3.15.0"
        ],
        "fixed_in": [
          "3.15.0"
        ],
        "ecosystem": "PyPI",
        "advisory": "GHSA-5gwj-m78q-7pq3"
      }
    ],
    "upgrade": [
      "Upgrade keras to 3.12.3 or later.",
      "Upgrade keras to 3.15.0 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
