CVE-2026-11816 Path Traversal in keras-team/keras

High 8.1 Published Updated

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.

PackageAffectedFixed in
keras PyPIAll versions3.14.0
keras PyPIAll versions3.14.0
keras PyPIAll versions3.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.

Sources

Also known as DEBIAN-CVE-2026-11816, GHSA-hqp4-2352-xf5r, MINI-vgxg-gqvx-mx62, PYSEC-2026-2324, UBUNTU-CVE-2026-11816.

Is CVE-2026-11816 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free