CVE-2026-12481 keras vulnerability
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.
Quick answer
keras should be reviewed and updated if it matches the affected versions. The recommended fix is to apply the vendor-supported patched version or the mitigation steps below, then retest the public website with Fixnx.
Who is affected
Affected versions
- 3.14.0
Fixed versions
- Apply the latest vendor-supported patched version.
How to fix it
CVE-2026-12481 affects Keras model deserialization. Loading an untrusted Lambda layer can run attacker code. Do not load untrusted model configs, keep safe mode enabled, and update to the latest vendor-supported patched Keras release when available.
- Find every service, notebook, and worker that loads Keras models.
- Block model files and configs from untrusted users or public uploads.
- Do not call Lambda.from_config or similar deserialization on untrusted input.
- Keep safe mode enabled when loading models.
- Update Keras to the latest vendor-supported patched release when the advisory lists one.
- Run model loading in a locked-down sandbox if old models must be inspected.
- Review logs for unexpected process starts or file access.
Scan now. Google sign-in is only needed to unlock fix guidance.
Verify the fix
- Confirm untrusted model uploads cannot reach Keras deserialization code.
- Confirm safe mode is enabled in model loading paths.
- Confirm the deployed Keras version matches the vendor-approved patched release when available.
- Run tests with trusted model files only.
- Save code review notes and runtime checks as evidence.
Related categories
Trusted references
FAQ
What is affected by CVE-2026-12481?
keras versions listed as affected should be reviewed: 3.14.0.
What should I fix first?
Start with internet-facing sites, admin panels, login flows, plugins, themes, modules, packages, and systems that process user-controlled input or sensitive data.
How do I confirm the fix worked?
Apply the patched version or mitigation, clear caches where relevant, retest the affected workflow, and run a new Fixnx scan to verify public website exposure signals.
How are Fixnx security risk categories chosen?
Fixnx keeps one canonical risk page and assigns only broad, relevant categories such as ecosystem, technology area, or vulnerability class.
