CVE-2025-12638CWE-22path-traversal

CVE-2025-12638

High · published November 28, 2025

CVSS v3.0
8.0
EPSS
1%
Percentile
50.8
In the wild
Unconfirmed
What it is

⚡ Keras version 3.11.3 is playing with fire, allowing files to be extracted right out of bounds! 🚨 Think of it like a delivery service that misreads an address on a package. Instead of dropping it off at the designated spot, it ends up delivering it to the neighbor's backyard instead! An attacker could exploit this vulnerability to write arbitrary files outside the intended extraction directory, potentially leading to system compromise or the execution of malicious code. It's like having an uninvited guest who can freely wander through your house and rearrange everything — not ideal for your security!

Put simply

Think of it like a delivery service that misreads an address on a package. Instead of dropping it off at the designated spot, it ends up delivering it to the neighbor's backyard instead! This path traversal vulnerability in Keras occurs in the keras.utils.get_file() function, which uses Python's tarfile.extractall() without the necessary security filter. The filtering happens too early, allowing the attacker to bypass checks and manipulate file paths during extraction.

What to do

An attacker could exploit this vulnerability to write arbitrary files outside the intended extraction directory, potentially leading to system compromise or the execution of malicious code. It's like having an uninvited guest who can freely wander through your house and rearrange everything — not ideal for your security! To mitigate this risk, upgrade to a secure version of Keras where the extraction process is secured with the filter parameter. If you're using Keras 3.11.3, patch it immediately or limit the use of the get_file() function with tar archives until a fix is applied. You've got this! Follow the steps to secure your Keras setup and keep those pesky vulnerabilities at bay! 🛡️

The record
Technical detail
CVSS v3.0
8.0 · HIGH
Vector
CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00654 · 50.8th percentile
Weakness
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Published
2025-11-28T20:16Z
References (1)
EPSS history
Timeline
  • 28 NOV 14:06Z
    Path Traversal Vulnerability in keras-team/keras via Tar Archive Extraction in keras.utils.get_file()
    cvelistv5