{"id":"CVE-2026-12484","published":"2026-07-19T19:47:27Z","modified":"2026-07-20T13:45:55Z","title":"Unsafe Deserialization in keras.layers.TorchModuleWrapper.from_config","vendor":"keras-team","product":"keras-team/keras","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.0","vector":"CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00304,"percentile":0.23786,"provenance":"source"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"references":[{"url":"https://huntr.com/bounties/ab14df49-13b5-4442-b754-3189430bfa28","tags":[]}],"priority":{"score":10.2,"factors":[{"name":"EPSS percentile","points":4.76},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"keras-team","affectedVersions":[{"vendor":"keras-team","product":"keras-team/keras","versions":[">= unspecified, <= latest"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-07-20T13:45:26.059176Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"keras","vulnerableRanges":["<3.12.3",">=3.13.0, <3.15.0"],"patched":["3.12.3","3.15.0"],"from":["GHSA-v2w2-w228-c444","PYSEC-2026-3634"],"provenance":"source"}],"summary":{"text":"The keras-team/keras library (version 3.15.0) contains an unsafe deserialization flaw in the public method keras.layers.TorchModuleWrapper.from_config, which calls torch.load with weights_only=False and no explicit opt-in, so it is unsafe by default when no Keras safe mode context is active. An attacker who can get a victim to process a crafted Keras layer configuration containing malicious PyTorch pickle data, through a local attack vector that requires user interaction, can achieve arbitrary code execution, provided the configuration is loaded outside a SafeModeScope(True) context.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:00:24Z"},"euvd":{"id":"EUVD-2026-45872","exploited":false,"provenance":"source"}}