REDHAT-BUG-2487912: Path Traversal

Published Jun 11, 2026
·
Updated

Keras versions prior to 3.14.0 are vulnerable to a path traversal issue in the archive extraction utilities located in keras/src/utils/fileutils.py. The functions filtersafetarinfos() and filtersafezipinfos() 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.

Affected Software

1 affected component
Keras Keras<3.14.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Keras to a version that resolves this vulnerability.

    Fixed in 3.14.0
  2. Configuration

    Update the archive extraction utilities so filter_safe_tarinfos() and filter_safe_zipinfos() validate archive member paths against the real extraction destination (not the process current working directory/CWD).

    Keras archive extraction utilities (filter_safe_tarinfos / filter_safe_zipinfos in keras/src/utils/file_utils.py) Archive path validation boundary = Validate against the actual extraction destination instead of process CWD
  3. Compensating control

    Avoid running the process with CWD set to `/` (e.g., in Docker/CI/CD/Jupyter environments). Set the working directory to a non-root path so CWD-based validation cannot become the filesystem root boundary.

Event History

Jun 11, 2026
Data Sourced
via Red Hat·03:01 PM
DescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2487912?

The severity of REDHAT-BUG-2487912 is classified as high with a score of 7.

2

How do I fix REDHAT-BUG-2487912?

You can fix REDHAT-BUG-2487912 by updating to Keras version 3.14.0 or later.

3

What vulnerability does REDHAT-BUG-2487912 describe?

REDHAT-BUG-2487912 describes a path traversal vulnerability in Keras versions prior to 3.14.0.

4

What functions are affected by REDHAT-BUG-2487912?

The functions affected by REDHAT-BUG-2487912 are filter_safe_tarinfos() and filter_safe_zipinfos() in the file_utils.py.

5

What potential impact does REDHAT-BUG-2487912 have?

REDHAT-BUG-2487912 could allow an attacker to exploit the path traversal issue to access unauthorized files on the system.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203