{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-12481","id":"CVE-2026-12481","title":"Deserialization of Untrusted Data in keras-team/keras","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 er","descriptionLong":"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.","published":"2026-07-03T20:36:05.003Z","updated":"2026-10-28T02:30:59.740924675Z","reserved":"2026-06-17T01:06:48.759Z","status":"Analyzed","rejected":false,"assigner":"@huntr_ai","metric":{"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","rating":"critical","source":"NVD"},"metrics":[{"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","rating":"critical","source":"NVD"},{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"@huntr_ai"},{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"huntr.dev"},{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"}],"rating":"critical","products":["keras-team/keras"],"affectedProducts":[{"vendor":"keras-team","product":"keras-team/keras","defaultStatus":null,"versions":[{"version":"unspecified","status":"affected","versionType":"custom","lessThanOrEqual":"latest"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"keras","purl":"pkg:pypi/keras","ranges":["<3.12.3",">=3.13.0 <3.15.0"],"fixed":["3.12.3","3.15.0"],"advisory":"GHSA-5gwj-m78q-7pq3"}],"cwes":["CWE-502"],"aliases":["GHSA-5gwj-m78q-7pq3","PYSEC-2026-3631"],"references":[{"url":"https://huntr.com/bounties/59ceaed1-c8a3-4135-8f94-169ade02823d","tags":["exploit","Exploit","Third Party Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/12xxx/CVE-2026-12481.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-12481","tags":["advisory"]},{"url":"https://github.com/keras-team/keras/pull/23048","tags":["web"]},{"url":"https://github.com/keras-team/keras/pull/23165","tags":["web"]},{"url":"https://github.com/keras-team/keras/commit/55888d3becbdbb45dc16a55b489900f911e2dde5","tags":["web"]},{"url":"https://github.com/keras-team/keras/commit/d338a45204bdc787c8b3c4a9b82c1911cd52dedf","tags":["web"]},{"url":"https://github.com/keras-team/keras","tags":["package"]},{"url":"https://github.com/keras-team/keras/releases/tag/v3.12.3","tags":["web"]},{"url":"https://github.com/keras-team/keras/releases/tag/v3.15.0","tags":["web"]},{"url":"https://pypi.org/project/keras","tags":["package"]},{"url":"https://github.com/advisories/GHSA-5gwj-m78q-7pq3","tags":["advisory"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total"},"epss":0.00719,"epssPercentile":0.54654,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-12481","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-12481","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-12481","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-5gwj-m78q-7pq3","ok":true,"note":"GHSA-5gwj-m78q-7pq3"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-12481","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}