# CVE-2026-11816: Keras path traversal in archive extraction utilities

Source: https://junglewise.ai/threats/cve-2026-11816-keras-path-traversal-in-archive-extraction-utilities  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-11. Updated: 2026-08-07  
License: CC BY 4.0 with a link back

CVE-2026-11816 · Severity: high · CVSS 8.1 · Published 2026-06-11

Keras, a popular machine learning library, contains a vulnerability in how it handles compressed archive files (like .tar and .zip). An attacker could provide a specially crafted archive that, when opened, writes files to unintended locations on the computer or server. This could allow an attacker to overwrite critical system settings, inject malicious code, or corrupt important data, particularly in environments like Docker or Jupyter notebooks.

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

## Quick answers

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

**How severe is CVE-2026-11816?** High severity, with a CVSS score of 8.1, published 11 June 2026.

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

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

**How is CVE-2026-11816 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-11816?** 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.14.0 or later

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


## Technical details

A path traversal vulnerability exists in Keras's archive extraction utilities, specifically within the `filter_safe_tarinfos()` and `filter_safe_zipinfos()` functions in `file_utils.py`. The root cause is that these functions validate archive member paths against the process's current working directory (CWD) rather than the intended extraction target. In environments where the CWD is the filesystem root (common in Docker and CI/CD), attackers can bypass security checks to perform arbitrary file writes. The vulnerability is exacerbated on Python 3.11, which lacks native extraction filters, and by a bug in the zip filter that causes an `AttributeError` during blocked entry encounters. Attackers can exploit this via network-delivered malicious archives to achieve arbitrary code execution or data corruption. The issue is fixed in version 3.14.0.

## Affected products

- Keras Team Keras < 3.14.0

## Identifiers

- CVE-2026-11816
- GHSA-hqp4-2352-xf5r
- PYSEC-2026-2324

## Timeline

- 2026-06-11: disclosed
- 2026-06-11: advisory
- 2026-08-07: patched: Advisory updated with patch information for version 3.14.0

## References

- [https://api.github.com/users/hahwul](https://api.github.com/users/hahwul)
- [https://github.com/hahwul](https://github.com/hahwul)
- [https://api.github.com/users/hahwul/gists%7B/gist_id%7D](https://api.github.com/users/hahwul/gists%7B/gist_id%7D)
- [https://api.github.com/users/hahwul/repos](https://api.github.com/users/hahwul/repos)
- [https://avatars.githubusercontent.com/u/13212227?v=4](https://avatars.githubusercontent.com/u/13212227?v=4)
- [https://api.github.com/users/hahwul/events%7B/privacy%7D](https://api.github.com/users/hahwul/events%7B/privacy%7D)

## 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)
