CVE-2026-12484
Received Received - Intake

Unsafe Deserialization in Keras 3.15.0 via TorchModuleWrapper

Vulnerability report for CVE-2026-12484, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-19

Last updated on: 2026-07-20

Assigner: huntr.dev

Description

A vulnerability in keras-team/keras version 3.15.0 allows unsafe deserialization of attacker-controlled PyTorch pickle data through the public `keras.layers.TorchModuleWrapper.from_config` method. This method invokes `torch.load(..., weights_only=False)` without requiring an explicit unsafe opt-in, such as a `safe_mode=False` parameter. When called outside a `SafeModeScope(True)` context, the absence of an ambient safe mode state permits unsafe deserialization by default. This issue can lead to arbitrary code execution if untrusted Keras layer configurations are processed using this method. The vulnerability arises because the method does not enforce safe deserialization practices unless explicitly guarded by Keras safe mode.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-19
Last Modified
2026-07-20
Generated
2026-07-20
AI Q&A
2026-07-20
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
keras-team keras 3.15.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-502 The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability in keras-team/keras version 3.15.0 allows unsafe deserialization of attacker-controlled PyTorch pickle data through the public keras.layers.TorchModuleWrapper.from_config method. The method calls torch.load without requiring an explicit unsafe opt-in, enabling arbitrary code execution if untrusted Keras layer configurations are processed.

Detection Guidance

Detecting this vulnerability requires checking for usage of keras.layers.TorchModuleWrapper.from_config in your codebase. Search for imports of keras.layers and calls to from_config. Review any code that processes untrusted Keras layer configurations or PyTorch pickle data.

Impact Analysis

If you process untrusted Keras layer configurations using the affected method, an attacker could execute arbitrary code on your system. This could lead to data breaches, system compromise, or further network infiltration depending on the attacker's goals.

Compliance Impact

This vulnerability could lead to arbitrary code execution if untrusted Keras layer configurations are processed, potentially compromising data confidentiality and integrity. For GDPR, this may violate principles of data protection and security. For HIPAA, it could risk unauthorized access to protected health information.

Mitigation Strategies

Immediately update Keras to a patched version if available. Avoid processing untrusted Keras layer configurations. Use SafeModeScope(True) when deserializing PyTorch data. Ensure torch.load is called with weights_only=True unless explicitly required.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-12484. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart