Junglewise Threat Intelligence

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

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

Executive brief

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.

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

Timeline

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

References

Related threats