CVE-2024-55459
Description
An issue in keras 3.7.0 allows attackers to write arbitrary files to the user's machine via downloading a crafted tar file through the get_file function.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
CVE-2024-55459 in Keras 3.7.0 allows arbitrary file write via a crafted tar file through the get_file function, enabling potential code execution.
Vulnerability
The vulnerability resides in the get_file function of Keras 3.7.0, which is used to download and cache files from URLs. When the function processes a tar archive (e.g., a .tar.gz file), it does not properly validate or sanitize the extracted file paths. A maliciously crafted tar file containing entries with directory traversal sequences (e.g., ../) can cause files to be written to arbitrary locations on the user's filesystem [1][2].
Exploitation
An attacker can exploit this by hosting a crafted tar file and luring a victim into using keras.utils.get_file to download it. No special authentication is required if the victim's code directly fetches the attacker-controlled URL. The attack surface is broad because get_file is commonly used in tutorial code, notebooks, and scripts to download model weights or datasets [1][2].
Impact
Successful exploitation allows an attacker to write arbitrary files to arbitrary locations on the victim's machine. This can lead to remote code execution if the attacker overwrites a system script, a Python library file, or a startup configuration. The CVSS score (likely high) reflects the potential for severe integrity and confidentiality impact, though availability is not directly compromised [2].
Mitigation
At the time of publication, a patched version of Keras 3.7.0 has not been announced. Users should avoid using get_file with untrusted URLs or manually validate extracted file paths. Security teams should monitor the Keras repository for a fix and apply it promptly [1][2].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
kerasPyPI | <= 3.7.0 | — |
Affected products
16- keras/kerasdescription
- osv-coords15 versionspkg:apk/chainguard/kubeflow-pipelines-visualization-serverpkg:apk/chainguard/py3.10-keraspkg:apk/chainguard/py3.11-keraspkg:apk/chainguard/py3.12-keraspkg:apk/chainguard/py3.13-keraspkg:apk/chainguard/py3-keraspkg:apk/chainguard/py3-supported-keraspkg:apk/wolfi/kubeflow-pipelines-visualization-serverpkg:apk/wolfi/py3.10-keraspkg:apk/wolfi/py3.11-keraspkg:apk/wolfi/py3.12-keraspkg:apk/wolfi/py3.13-keraspkg:apk/wolfi/py3-keraspkg:apk/wolfi/py3-supported-keraspkg:pypi/keras
< 2.3.0-r5+ 14 more
- (no CPE)range: < 2.3.0-r5
- (no CPE)range: < 3.8.0-r0
- (no CPE)range: < 3.8.0-r0
- (no CPE)range: < 3.8.0-r0
- (no CPE)range: < 3.8.0-r0
- (no CPE)range: < 3.8.0-r0
- (no CPE)range: < 3.8.0-r0
- (no CPE)range: < 2.3.0-r5
- (no CPE)range: < 3.8.0-r0
- (no CPE)range: < 3.8.0-r0
- (no CPE)range: < 3.8.0-r0
- (no CPE)range: < 3.8.0-r0
- (no CPE)range: < 3.8.0-r0
- (no CPE)range: < 3.8.0-r0
- (no CPE)range: <= 3.7.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-cjgq-5qmw-rcj6ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-55459ghsaADVISORY
- github.com/keras-team/keras/blob/8f5592bcb61ff48c96560c8923e482db1076b54a/keras/src/utils/file_utils.pyghsaWEB
- keras.ioghsaWEB
- river-bicycle-f1e.notion.site/Arbitrary-File-Write-Vulnerability-in-get_file-function-11888e31952580179224e50892976d32ghsaWEB
News mentions
0No linked articles in our index yet.