HIGH Google Inc. Vulnerability Alert

Product:

Keras

Summary

The keras.utils.get_file API in Keras is vulnerable to a path traversal attack when used with the extract=True option for tar archives. This vulnerability allows a remote attacker to craft a malicious tar archive containing special symlinks, enabling them to write arbitrary files to any location on the filesystem outside of the intended destination folder. The issue is linked to a weakness in the underlying Python tarfile module.

Details

Severity Base Score CVE
HIGH 8.9 CVE-2025-12060

Exploitation

To exploit this vulnerability, an attacker can create a malicious tar archive that includes specially crafted symlinks. When the archive is extracted using the vulnerable keras.utils.get_file API with the extract=True option, the symlinks can redirect the extraction process to write files outside the intended directory, potentially compromising the filesystem.

Affected Products

  • Keras: Vulnerable when using keras.utils.get_file with extract=True for tar archives.

Mitigation

To mitigate this vulnerability, users should upgrade both Keras to version 3.12 and Python to a version that addresses CVE-2025-4517, such as Python 3.13.4. This ensures that the path traversal issue is resolved and prevents potential exploitation.

References