Description
A vulnerability in keras-team/keras version 3.12.0 allows an attacker to craft a malicious tar archive that bypasses the `filter_safe_tarinfos` validation in `keras/src/utils/file_utils.py`. Specifically, symlink entries are not subjected to the same `is_path_in_dir` validation as regular file entries, allowing symlinks to be created outside the intended extraction directory. This can lead to symlink-based file read, file overwrite, or directory escape attacks. The issue is particularly impactful on Python 3.10 and 3.11, where `filter_safe_tarinfos` is the sole defense against tar path traversal. This vulnerability is distinct from CVE-2025-12060 and other previously reported issues.
Published: 2026-07-14
Score: 4.2 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability resides in Keras 3.12.0. When a tar archive is extracted, the library's safety filter does not enforce the same path‑in‑directory check on symlink entries, allowing a crafted archive to create links pointing outside the intended extraction directory. As a result, an attacker can read existing files, overwrite arbitrary files, or escape the extraction sandbox. The weakness is aligned with CWE-22.

Affected Systems

The flaw affects the Keras library from keras-team, version 3.12.0. Only this version is listed; no other versions or ranges are indicated. On environments running Python 3.10 or 3.11, the provided filter is the sole defense against tar path traversal.

Risk and Exploitability

Based on the description, the vulnerability is limited to tar extraction routines that allow untrusted archives to be processed. The likely attack vector is a local attacker delivering a malicious tar file to an application that extracts archives, as the description indicates that tampering occurs during routine extraction. This inference is drawn directly from the provided description. Remote exploitation could be possible if a server‑side application processes untrusted archives; this possibility is inferred. The CVSS score of 4.2 represents low‑to‑moderate severity, and the EPSS score of < 1 % shows a very low probability of exploitation. The vulnerability is not listed in CISA's KEV catalog. Because the flaw only modifies the extraction logic, the attacker must have write access to the target directory; if the process runs with elevated privileges, the impact could affect the entire filesystem, which is inferred from the nature of the issue described.

Generated by OpenCVE AI on August 1, 2026 at 10:02 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Keras to the latest release that includes the path‑validation fix.
  • If a patch is unavailable, modify the extraction routine to apply the same is_path_in_dir validation to symlink entries or disable symlink resolution for untrusted archives.
  • Run the extraction process in a sandboxed environment or with restricted write permissions to limit the potential damage of a symlink attack.

Generated by OpenCVE AI on August 1, 2026 at 10:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 27 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
First Time appeared Keras-team
Keras-team keras
Vendors & Products Keras-team
Keras-team keras

Wed, 15 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.2, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N'}

threat_severity

Moderate


Tue, 14 Jul 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 14 Jul 2026 05:30:00 +0000

Type Values Removed Values Added
Description A vulnerability in keras-team/keras version 3.12.0 allows an attacker to craft a malicious tar archive that bypasses the `filter_safe_tarinfos` validation in `keras/src/utils/file_utils.py`. Specifically, symlink entries are not subjected to the same `is_path_in_dir` validation as regular file entries, allowing symlinks to be created outside the intended extraction directory. This can lead to symlink-based file read, file overwrite, or directory escape attacks. The issue is particularly impactful on Python 3.10 and 3.11, where `filter_safe_tarinfos` is the sole defense against tar path traversal. This vulnerability is distinct from CVE-2025-12060 and other previously reported issues.
Title Path Traversal via Symlink Name Validation Bypass in keras-team/keras
Weaknesses CWE-22
References
Metrics cvssV3_0

{'score': 3.1, 'vector': 'CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N'}


Subscriptions

Keras-team Keras
cve-icon MITRE

Status: PUBLISHED

Assigner: @huntr_ai

Published:

Updated: 2026-07-14T12:43:09.817Z

Reserved: 2026-06-17T01:32:32.655Z

Link: CVE-2026-12482

cve-icon Vulnrichment

Updated: 2026-07-14T12:43:06.248Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-14T05:13:07Z

Links: CVE-2026-12482 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-01T10:15:03Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')