CVE-2026-12481
Full vulnerability record from the local CVENow database.
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.
View original CVE JSON
{
"id": "CVE-2026-12481",
"sourceIdentifier": "[email protected]",
"published": "2026-07-03T21:16:54.737",
"lastModified": "2026-10-25T15:10:00.147",
"vulnStatus": "Analyzed",
"cveTags": [],
"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."
},
{
"lang": "es",
"value": "Una vulnerabilidad en keras-team/keras versión 3.14.0 permite la ejecución de código arbitrario debido a un manejo inadecuado de la deserialización en la capa ’Lambda’. Específicamente, la función ’_raise_for_lambda_deserialization’ no aplica la protección de modo seguro cuando ’safe_mode’ se establece en ’None’, que es el valor predeterminado cuando se llama a ’from_config()’ fuera de un contexto de ’SafeModeScope’. Este error lógico confunde ’None’ (no establecido/denegación predeterminada) con ’False’ (explícitamente deshabilitado), eludiendo la protección y permitiendo que el bytecode ’marshal’ controlado por el atacante sea deserializado. Los sitios de llamada afectados incluyen ’keras.layers.deserialize(config)’, ’keras.models.clone_model(model)’, y cualquier invocación directa de ’Lambda.from_config(config)’ sin un ’SafeModeScope(True)’ envolvente. Esta vulnerabilidad puede ser explotada para lograr la ejecución de código arbitrario a nivel del sistema operativo en el contexto del servidor o del proceso de usuario."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "keras-team",
"product": "keras-team/keras",
"versions": [
{
"version": "unspecified",
"lessThanOrEqual": "latest",
"versionType": "custom",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "[email protected]",
"type": "Primary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"baseScore": 9.8,
"baseSeverity": "CRITICAL",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 3.9,
"impactScore": 5.9
}
],
"cvssMetricV30": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "3.0",
"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",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "REQUIRED",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 2.8,
"impactScore": 5.9
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-07-06T15:15:34.297007Z",
"id": "CVE-2026-12481",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "no"
},
{
"technicalImpact": "total"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-502"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:keras:keras:3.14.0:*:*:*:*:*:*:*",
"matchCriteriaId": "5AB5B43D-0D41-4CBB-97B5-F5FE10D56689"
}
]
}
]
}
],
"references": [
{
"url": "https://huntr.com/bounties/59ceaed1-c8a3-4135-8f94-169ade02823d",
"source": "[email protected]",
"tags": [
"Exploit",
"Third Party Advisory"
]
},
{
"url": "https://huntr.com/bounties/59ceaed1-c8a3-4135-8f94-169ade02823d",
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"tags": [
"Exploit",
"Third Party Advisory"
]
}
]
}