{"id":"CVE-2026-12481","state":"PUBLISHED","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 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.","publishedAt":"2026-07-03T20:36:05.003Z","updatedAt":"2026-07-06T15:15:46.244Z","severity":{"score":8.8,"label":"High","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"@huntr_ai"},"assigner":"@huntr_ai","products":["keras-team keras-team/keras"],"affected":[{"vendor":"keras-team","product":"keras-team/keras","versions":[{"version":"unspecified","status":"affected","lessThanOrEqual":"latest","versionType":"custom"}]}],"references":["https://huntr.com/bounties/59ceaed1-c8a3-4135-8f94-169ade02823d"],"weaknesses":["CWE-502"],"ingestedAt":"2026-10-29T20:10:52.580Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/12xxx/CVE-2026-12481.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-12481","state":"PUBLISHED","datePublished":"2026-07-03T20:36:05.003Z","dateUpdated":"2026-07-06T15:15:46.244Z","assignerShortName":"@huntr_ai","assignerOrgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateReserved":"2026-06-17T01:06:48.759Z"},"containers":{"cna":{"title":"Deserialization of Untrusted Data in keras-team/keras","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"keras-team","product":"keras-team/keras","versions":[{"version":"unspecified","status":"affected","lessThanOrEqual":"latest","versionType":"custom"}]}],"references":[{"url":"https://huntr.com/bounties/59ceaed1-c8a3-4135-8f94-169ade02823d"}],"metrics":[{"cvssV3_0":{"version":"3.0","attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-502","type":"CWE","lang":"en","description":"CWE-502 Deserialization of Untrusted Data"}]}],"providerMetadata":{"shortName":"@huntr_ai","orgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateUpdated":"2026-07-03T20:36:05.003Z"},"source":{"advisory":"59ceaed1-c8a3-4135-8f94-169ade02823d","discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://huntr.com/bounties/59ceaed1-c8a3-4135-8f94-169ade02823d","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-06T15:15:34.297007Z","id":"CVE-2026-12481","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-06T15:15:46.244Z"}}]}}}