# Keras: TorchModuleWrapper can deserialize unsafe PyTorch pickle data

Advisory record · `GHSA-v2w2-w228-c444`

- **Identifiers:** `GHSA-v2w2-w228-c444` · `CVE-2026-12484` · `PYSEC-2026-3634`
- **State:** Confirmed
- **Severity:** CVSS 7.8 High
- **Critical:** No
- **Weakness (CWE):** [CWE-502](https://cwe.mitre.org/data/definitions/502.html)
- **Tags:** [Insecure deserialization](https://agentprime.io/advisories/tag/deserialization.md)
- **Published:** 19 Jul 2026
- **Updated:** 10 Aug 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 19 Jul 2026, 21:30 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `keras` (PyPI): affected `<3.12.3 || >=3.13.0, <3.15.0`; fixed in `3.12.3`, `3.15.0`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Keras versions below 3.12.3, and versions from 3.13.0 up to but not including 3.15.0, are vulnerable. The keras.layers.TorchModuleWrapper.from_config method loads PyTorch pickle data with unsafe settings by default when Keras safe mode is not enabled, so an attacker who supplies a malicious layer configuration could achieve arbitrary code execution if untrusted configurations are processed. Upgrade to Keras 3.12.3 or 3.15.0. Until then, enable Keras safe mode and avoid loading untrusted layer configurations.

Written 5 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 7.8 High, CVSS 3.0: `CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`, from CNA (@huntr_ai)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0030, the 23rd percentile, on 10 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:40 UTC: First seen by agentprime
- 31 Oct 2026, 14:40 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-v2w2-w228-c444)

## Sources

- [GitHub Advisory Database: GHSA-v2w2-w228-c444](https://github.com/advisories/GHSA-v2w2-w228-c444)
- [OSV: GHSA-v2w2-w228-c444](https://osv.dev/vulnerability/GHSA-v2w2-w228-c444)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-12484>
- <https://github.com/keras-team/keras/pull/23048>
- <https://github.com/keras-team/keras/pull/23165>
- <https://github.com/keras-team/keras/commit/55888d3becbdbb45dc16a55b489900f911e2dde5>
- <https://github.com/keras-team/keras/commit/d338a45204bdc787c8b3c4a9b82c1911cd52dedf>
- <https://github.com/keras-team/keras>
- <https://github.com/keras-team/keras/releases/tag/v3.12.3>
- <https://github.com/keras-team/keras/releases/tag/v3.15.0>
- <https://huntr.com/bounties/ab14df49-13b5-4442-b754-3189430bfa28>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-v2w2-w228-c444>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-v2w2-w228-c444/>. Everything for agents: <https://agentprime.io/llms.txt>.
