# CVE-2026-12479: Keras Team Keras path traversal in DiskIOStore.make

Source: https://junglewise.ai/threats/cve-2026-12479-keras-team-keras-path-traversal-in-diskiostore-make  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-22. Updated: 2026-08-07  
License: CC BY 4.0 with a link back

CVE-2026-12479 · Severity: medium · CVSS 6.1 · Published 2026-06-22

Keras, a popular machine learning library, contains a vulnerability in how it handles model saving and loading. An attacker can create a specially crafted AI model that, when opened or saved by a user, performs unauthorized file operations outside of the intended folder. This could allow an attacker to create malicious directories or overwrite files on the user's system, potentially leading to data loss or system instability.

Technologies: [keras (PyPI)](https://junglewise.ai/threats/technologies/keras). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-12479 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-12479 being exploited in the wild.

**How severe is CVE-2026-12479?** Medium severity, with a CVSS score of 6.1, published 22 June 2026.

**Which products and versions are affected?** keras (PyPI) ECOSYSTEM:introduced=0,fixed=3.12.3, ECOSYSTEM:introduced=0,fixed=3.12.3,introduced=3.13.0,fixed=3.15.0.

**Is there a fix for CVE-2026-12479?** Yes. keras (PyPI): upgrade to 3.12.3, 3.15.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-12479 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-12479?** Check whether you run keras (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- keras (PyPI): upgrade to 3.12.3, 3.15.0 or later

  ```sh
  pip install "keras>=3.15.0"
  ```


## Technical details

A path traversal vulnerability exists in Keras (specifically version 3.14.0 and other affected ranges) within the `DiskIOStore.make` and `DiskIOStore.get` methods. The root cause is improper sanitization of user-provided layer names, which are used to construct directory paths. While forward slashes are restricted, directory traversal sequences (e.g., '..') are not neutralized. An attacker can craft a malicious Keras model with specific layer names that, when processed during saving or loading, escape the temporary working directory to create directories or write files in arbitrary locations. The vulnerability is addressed in versions 3.12.3 and 3.15.0 by implementing path resolution checks using `resolve_sub_path`.

## Affected products

- Keras Team Keras < 3.12.3, >= 3.13.0, < 3.15.0

## Identifiers

- CVE-2026-12479
- GHSA-gh82-f9x8-5frx
- PYSEC-2026-3632

## Timeline

- 2026-06-01: other: Pull request submitted to fix the issue
- 2026-06-02: patched: Fix merged into master branch
- 2026-06-22: disclosed: CVE-2026-12479 published
- 2026-06-26: advisory: Security release v3.12.3 published

## References

- [https://huntr.com/bounties/188836b9-12fc-49c7-8dbf-04f60fe33743](https://huntr.com/bounties/188836b9-12fc-49c7-8dbf-04f60fe33743)
- [https://github.com/keras-team/keras/pull/23017](https://github.com/keras-team/keras/pull/23017)
- [https://github.com/keras-team/keras/commit/d8caeb58cc9e61ea092445dc7a20908ca8d693e2](https://github.com/keras-team/keras/commit/d8caeb58cc9e61ea092445dc7a20908ca8d693e2)
- [https://github.com/keras-team/keras/releases/tag/v3.12.3](https://github.com/keras-team/keras/releases/tag/v3.12.3)
- [https://github.com/keras-team/keras/releases/tag/v3.15.0](https://github.com/keras-team/keras/releases/tag/v3.15.0)

## Related threats

- [Keras model loading denial of service via HDF5 shape bombs](https://junglewise.ai/threats/cve-2026-12570-keras-model-loading-denial-of-service-via-hdf5-shape-bombs)
- [Keras HDF5 arbitrary file disclosure via ExternalLinks](https://junglewise.ai/threats/cve-2026-9335-keras-hdf5-arbitrary-file-disclosure-via-externallinks)
- [Keras unsafe deserialization in TorchModuleWrapper](https://junglewise.ai/threats/cve-2026-12484-keras-unsafe-deserialization-in-torchmodulewrapper)
- [Keras path traversal via symlink in filter_safe_tarinfos](https://junglewise.ai/threats/cve-2026-12482-keras-path-traversal-via-symlink-in-filter-safe-tarinfos)
- [Keras Team Keras arbitrary code execution in Lambda layer](https://junglewise.ai/threats/cve-2026-12481-keras-team-keras-arbitrary-code-execution-in-lambda-layer)
