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

- **Severity:** High 8.1 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N`)
- **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:** Yes
- **Published:** 11 Jun 2026
- **Updated:** 21 Jul 2026
- **Also known as:** DEBIAN-CVE-2026-11816, GHSA-hqp4-2352-xf5r, MINI-vgxg-gqvx-mx62, PYSEC-2026-2324, UBUNTU-CVE-2026-11816

## 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 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-11816?

3 open source packages ship an affected version, including keras. It affects 1 product.


| Package | Ecosystem | 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: Keras Keras.

## How do I fix CVE-2026-11816?

Upgrade keras to 3.14.0 or later.

## 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](https://insights.sbomify.com/CVE-2024-3660/): Arbitrary code injection vulnerability in Keras framework < 2.13 (critical 9.8)
- [CVE-2026-12481](https://insights.sbomify.com/CVE-2026-12481/): Deserialization of Untrusted Data in keras-team/keras (high 8.8)
- [CVE-2026-1462](https://insights.sbomify.com/CVE-2026-1462/): Safe Mode Bypass in keras-team/keras (high 8.8)
- [CVE-2025-9906](https://insights.sbomify.com/CVE-2025-9906/): Arbitrary Code execution in Keras Safe Mode (high 8.6)
- [CVE-2025-8747](https://insights.sbomify.com/CVE-2025-8747/): Keras safe_mode bypass allows arbitrary code execution when loading a malicious model. (high 8.6)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-11816 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-11816 exists.

Affected packages and fixed versions:
- keras (PyPI): affected all versions; fixed in 3.14.0
- keras (PyPI): affected all versions; fixed in 3.14.0
- keras (PyPI): affected all versions; fixed in 3.14.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-11816/ (Markdown: https://insights.sbomify.com/CVE-2026-11816/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-11816
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-11816
- OSV: https://osv.dev/vulnerability/CVE-2026-11816

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-11816/
Summaries are generated and may contain mistakes; the official description above is the record.
