Keras: DiskIOStore permits path traversal through crafted layer names
Medium6.1CVE-2026-12479 · Published Jun 22, 2026 · updated Aug 10, 2026
A path traversal vulnerability exists in keras-team/keras version 3.14.0, specifically in the `DiskIOStore.make` method within the Keras 3 model saving and loading library. This vulnerability arises from the improper handling of user-provided layer names, which are used to construct directory paths without sanitizing for parent directory components (`..`). While forward slashes (`/`) are restricted in layer names, directory traversal sequences are not. This allows an attacker to craft a malicious Keras model that, when saved or loaded, can escape the intended temporary working directory and perform unauthorized file system operations, such as creating directories or writing files in arbitrary locations.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| keras PyPI | < 3.12.3 | 3.12.3 |
| >= 3.13.0, < 3.15.0 | 3.15.0 |
Details and references
- CVSS 3.0
- CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-22
- Also known as
- CVE-2026-12479, PYSEC-2026-3632
- nvd.nist.gov/vuln/detail/CVE-2026-12479
- github.com/keras-team/keras/pull/23017
- github.com/keras-team/keras/commit/d8caeb58cc9e61ea092445dc7a20908ca8d693e2
- github.com/keras-team/keras
- github.com/keras-team/keras/releases/tag/v3.12.3
- github.com/keras-team/keras/releases/tag/v3.15.0
- huntr.com/bounties/188836b9-12fc-49c7-8dbf-04f60fe33743
More Keras advisories
All Keras| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Aug 2 | Keras: HDF5 links can disclose local file contents | Medium6.5 | 3.12.3+1 more |
| Jul 19 | Keras: TorchModuleWrapper can deserialize unsafe PyTorch pickle data | High7.8 | 3.12.3+1 more |
| Jul 14 | Keras: tar extraction permits symlink-based path traversal | Low3.1 | 3.12.3+1 more |
| Jul 3 | Keras: Lambda deserialization can bypass safe mode and execute code | High8.8 | 3.12.3+1 more |
| Jul 1 | Keras: HDF5 virtual datasets can disclose local files | Medium5.5 | 3.12.3+1 more |
| Jun 11 | Keras archive extraction utilities allow path traversal and arbitrary file writes | High8.1 | 3.14.0 |