CVE-2026-11816 Path Traversal in keras-team/keras
Attackers can write arbitrary files outside the extraction directory via path traversal in Keras archive utilities, potentially leading to code execution or data corruption.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-11816?
CVE-2026-11816 is a high-severity path traversal vulnerability in keras-team/keras, published on 11 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Keras versions prior to 3.14.0 are vulnerable to a path traversal issue in the archive extraction utilities located in `keras/src/utils/file_utils.py`. The functions `filter_safe_tarinfos()` and `filter_safe_zipinfos()` validate archive member paths against the process current working directory (CWD) instead of the actual extraction destination. When the process runs with CWD set to `/`, which is common in Docker containers, CI/CD runners, and Jupyter environments, the validation boundary becomes the filesystem root, allowing traversal paths to bypass the security check. Additionally, the zip filter contains a bug that causes an `AttributeError` when a blocked entry is encountered, leading to incomplete extraction. Furthermore, Python 3.11 installations lack the `filter="data"` safety net, leaving them entirely reliant on the flawed CWD-based filter. Exploitation of this vulnerability can result in arbitrary file writes outside the intended extraction directory, enabling attackers to overwrite configuration files, inject malicious code, or corrupt machine learning datasets and pipelines.
Weakness: CWE-22
Which versions are affected by CVE-2026-11816?
3 open source packages ship an affected version, including keras. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
keras PyPI | All versions | 3.14.0 |
keras PyPI | All versions | 3.14.0 |
keras PyPI | All versions | 3.14.0 |
Products include Keras Keras.
How do I fix CVE-2026-11816?
Upgrade keras to 3.14.0 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-11816 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-11816 exists.
Other vulnerabilities in keras-team/keras
- CVE-2024-3660 Arbitrary code injection vulnerability in Keras framework < 2.13
- CVE-2026-12481 Deserialization of Untrusted Data in keras-team/keras
- CVE-2026-1462 Safe Mode Bypass in keras-team/keras
- CVE-2025-9906 Arbitrary Code execution in Keras Safe Mode
- CVE-2025-8747 Keras safe_mode bypass allows arbitrary code execution when loading a malicious model.
Sources
Also known as DEBIAN-CVE-2026-11816, GHSA-hqp4-2352-xf5r, MINI-vgxg-gqvx-mx62, PYSEC-2026-2324, UBUNTU-CVE-2026-11816.