cve.bz

CVE-2025-12638 keras-team keras-team/keras: Path traversal

8.0 highEPSS 0.7%

High (8.0) in keras-team keras-team/keras. EPSS 0.7% estimated probability of exploitation activity in the next 30 days.

On this page
Keras version 3.11.3 is affected by a path traversal vulnerability in the keras.utils.get_file() function when extracting tar archives. The vulnerability arises because the function uses Python's tarfile.extractall() method without the security-critical filter='data' parameter. Although Keras attempts to filter unsafe paths using filter_safe_paths(), this filtering occurs before extraction, and a PATH_MAX symlink resolution bug triggers during extraction. This bug causes symlink resolution to fail due to path length limits, resulting in a security bypass that allows files to be written outside the intended extraction directory. This can lead to arbitrary file writes outside the cache directory, enabling potential system compromise or malicious code execution. The vulnerability affects Keras installations that process tar archives with get_file() and does not affect versions where this extraction method is secured with the appropriate filter parameter.

Severity

CVSS 3.0

8.0 high
CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
EPSS
0.7% (unchanged from 0.7% a week ago; 0.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 54th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2025-11-28. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-12638 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-12638?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-12638?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-12638 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
keras-team/kerasthrough latest

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11kerasno fix listedDEBIAN-CVE-2025-12638
Ubuntu18.04:LTS, 20.04:LTSkerasno fix listedUBUNTU-CVE-2025-12638
Azure Linux3keras3.3.3-5AZL-71185

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Important.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat OpenShift AI 2.16rhoai/odh-modelmesh-runtime-adapter-rhel8:1774283191Fixed 2026-03-25RHSA-2026:5807
Red Hat OpenShift AI 2.25rhoai/odh-kserve-agent-rhel9:v2.25.1-1765613316Fixed 2025-12-17RHSA-2025:23531
Red Hat OpenShift AI 2.25rhoai/odh-kserve-controller-rhel9:v2.25.1-1765613316Fixed 2025-12-17RHSA-2025:23531
Red Hat OpenShift AI 2.25rhoai/odh-kserve-router-rhel9:v2.25.1-1765613316Fixed 2025-12-17RHSA-2025:23531
Red Hat OpenShift AI 2.25rhoai/odh-kserve-storage-initializer-rhel9:v2.25.1-1765326513Fixed 2025-12-17RHSA-2025:23531
Red Hat OpenShift AI 2.25rhoai/odh-modelmesh-runtime-adapter-rhel9:v2.25.1-1764825096Fixed 2025-12-17RHSA-2025:23531
Red Hat OpenShift AI 2.25rhoai/odh-pipeline-runtime-tensorflow-cuda-py312-rhel9:v2.25.1-1764961121Fixed 2025-12-17RHSA-2025:23531
Red Hat OpenShift AI 2.25rhoai/odh-pipeline-runtime-tensorflow-rocm-py312-rhel9:v2.25.1-1764961121Fixed 2025-12-17RHSA-2025:23531
Red Hat OpenShift AI 2.25rhoai/odh-workbench-jupyter-tensorflow-cuda-py312-rhel9:v2.25.1-1764961121Fixed 2025-12-17RHSA-2025:23531
Red Hat OpenShift AI 2.25rhoai/odh-workbench-jupyter-tensorflow-rocm-py312-rhel9:v2.25.1-1764961121Fixed 2025-12-17RHSA-2025:23531
Red Hat OpenShift AI 3.3rhoai/odh-kserve-agent-rhel9:1770754605Fixed 2026-03-04RHSA-2026:3713
Red Hat OpenShift AI 3.3rhoai/odh-kserve-controller-rhel9:1770754646Fixed 2026-03-04RHSA-2026:3713
Red Hat OpenShift AI 3.3rhoai/odh-kserve-router-rhel9:1770754585Fixed 2026-03-04RHSA-2026:3713
Red Hat OpenShift AI 3.3rhoai/odh-kserve-storage-initializer-rhel9:1771840993Fixed 2026-03-04RHSA-2026:3713
Red Hat OpenShift AI 3.3rhoai/odh-pipeline-runtime-tensorflow-cuda-py312-rhel9:1771502897Fixed 2026-03-04RHSA-2026:3713
Red Hat OpenShift AI 3.3rhoai/odh-pipeline-runtime-tensorflow-rocm-py312-rhel9:1771502844Fixed 2026-03-04RHSA-2026:3713
Red Hat OpenShift AI 3.3rhoai/odh-workbench-jupyter-tensorflow-cuda-py312-rhel9:1771502910Fixed 2026-03-04RHSA-2026:3713
Red Hat OpenShift AI 3.3rhoai/odh-workbench-jupyter-tensorflow-rocm-py312-rhel9:1771502884Fixed 2026-03-04RHSA-2026:3713
Red Hat Trusted Artifact Signer 1.3rhtas/model-transparency-rhel9:1772614635Fixed 2026-03-11RHSA-2026:4271

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-12638.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON