Lookup for vulnerable packages by Package URL.

Purlpkg:pypi/keras@3.12.0
Typepypi
Namespace
Namekeras
Version3.12.0
Qualifiers
Subpath
Is_vulnerabletrue
Next_non_vulnerable_version3.13.2
Latest_non_vulnerable_version3.13.2
Affected_by_vulnerabilities
0
url VCID-1xj9-1kng-8ua4
vulnerability_id VCID-1xj9-1kng-8ua4
summary Allocation of Resources Without Limits or Throttling in the HDF5 weight loading component in Google Keras 3.0.0 through 3.13.0 on all platforms allows a remote attacker to cause a Denial of Service (DoS) through memory exhaustion and a crash of the Python interpreter via a crafted .keras archive containing a valid model.weights.h5 file whose dataset declares an extremely large shape.
references
0
reference_url https://github.com/keras-team/keras/pull/21880
reference_id
reference_type
scores
0
value 7.5
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
url https://github.com/keras-team/keras/pull/21880
fixed_packages
0
url pkg:pypi/keras@3.13.1
purl pkg:pypi/keras@3.13.1
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-ptyp-n4df-aqf1
resource_url http://public2.vulnerablecode.io/packages/pkg:pypi/keras@3.13.1
aliases CVE-2026-0897, PYSEC-2026-73
risk_score null
exploitability null
weighted_severity null
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-1xj9-1kng-8ua4
Fixing_vulnerabilities
0
url VCID-1wr2-9bym-kke5
vulnerability_id VCID-1wr2-9bym-kke5
summary
Keras Directory Traversal Vulnerability
Keras's `keras.utils.get_file()` function is vulnerable to directory traversal attacks despite implementing `filter_safe_paths()`. The vulnerability exists because `extract_archive()` uses Python's `tarfile.extractall()` method without the security-critical `filter="data"` parameter. A PATH_MAX symlink resolution bug occurs before path filtering, allowing malicious tar archives to bypass security checks and write files outside the intended extraction directory.
references
0
reference_url https://github.com/keras-team/keras
reference_id
reference_type
scores
url https://github.com/keras-team/keras
1
reference_url https://github.com/keras-team/keras/commit/47fcb397ee4caffd5a75efd1fa3067559594e951
reference_id
reference_type
scores
url https://github.com/keras-team/keras/commit/47fcb397ee4caffd5a75efd1fa3067559594e951
2
reference_url https://github.com/keras-team/keras/pull/21760
reference_id
reference_type
scores
url https://github.com/keras-team/keras/pull/21760
3
reference_url https://huntr.com/bounties/f94f5beb-54d8-4e6a-8bac-86d9aee103f4
reference_id
reference_type
scores
url https://huntr.com/bounties/f94f5beb-54d8-4e6a-8bac-86d9aee103f4
4
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-12060
reference_id CVE-2025-12060
reference_type
scores
url https://nvd.nist.gov/vuln/detail/CVE-2025-12060
5
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-12638
reference_id CVE-2025-12638
reference_type
scores
url https://nvd.nist.gov/vuln/detail/CVE-2025-12638
6
reference_url https://github.com/advisories/GHSA-hjqc-jx6g-rwp9
reference_id GHSA-hjqc-jx6g-rwp9
reference_type
scores
url https://github.com/advisories/GHSA-hjqc-jx6g-rwp9
7
reference_url https://github.com/keras-team/keras/security/advisories/GHSA-hjqc-jx6g-rwp9
reference_id GHSA-hjqc-jx6g-rwp9
reference_type
scores
url https://github.com/keras-team/keras/security/advisories/GHSA-hjqc-jx6g-rwp9
fixed_packages
0
url pkg:pypi/keras@3.12.0
purl pkg:pypi/keras@3.12.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1xj9-1kng-8ua4
resource_url http://public2.vulnerablecode.io/packages/pkg:pypi/keras@3.12.0
aliases CVE-2025-12060, GHSA-hjqc-jx6g-rwp9
risk_score null
exploitability null
weighted_severity null
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-1wr2-9bym-kke5
1
url VCID-4mb7-t1tm-eqf8
vulnerability_id VCID-4mb7-t1tm-eqf8
summary
Duplicate Advisory: Keras keras.utils.get_file API is vulnerable to a path traversal attack
### Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-hjqc-jx6g-rwp9. This link is maintained to preserve external references.

### Original Description
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.
references
0
reference_url https://github.com/keras-team/keras
reference_id
reference_type
scores
url https://github.com/keras-team/keras
1
reference_url https://github.com/keras-team/keras/commit/47fcb397ee4caffd5a75efd1fa3067559594e951
reference_id
reference_type
scores
url https://github.com/keras-team/keras/commit/47fcb397ee4caffd5a75efd1fa3067559594e951
2
reference_url https://huntr.com/bounties/f94f5beb-54d8-4e6a-8bac-86d9aee103f4
reference_id
reference_type
scores
url https://huntr.com/bounties/f94f5beb-54d8-4e6a-8bac-86d9aee103f4
3
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-12638
reference_id CVE-2025-12638
reference_type
scores
url https://nvd.nist.gov/vuln/detail/CVE-2025-12638
4
reference_url https://github.com/advisories/GHSA-9g7v-8wxv-mwxp
reference_id GHSA-9g7v-8wxv-mwxp
reference_type
scores
url https://github.com/advisories/GHSA-9g7v-8wxv-mwxp
fixed_packages
0
url pkg:pypi/keras@3.12.0
purl pkg:pypi/keras@3.12.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1xj9-1kng-8ua4
resource_url http://public2.vulnerablecode.io/packages/pkg:pypi/keras@3.12.0
aliases CVE-2025-12638, GHSA-9g7v-8wxv-mwxp
risk_score null
exploitability null
weighted_severity null
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-4mb7-t1tm-eqf8
2
url VCID-c11z-ye25-k7eh
vulnerability_id VCID-c11z-ye25-k7eh
summary
Duplicate Advisory: Keras keras.utils.get_file API is vulnerable to a path traversal attack
### Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-hjqc-jx6g-rwp9. This link is maintained to preserve external references.

### Original Description
The keras.utils.get_file API in Keras, when used with the extract=True option for tar archives, is vulnerable to a path traversal attack. The utility uses Python's tarfile.extractall function without the filter="data" feature. A remote attacker can craft a malicious tar archive containing special symlinks, which, when extracted, allows them to write arbitrary files to any location on the filesystem outside of the intended destination folder. This vulnerability is linked to the underlying Python tarfile weakness, identified as CVE-2025-4517. Note that upgrading Python to one of the versions that fix CVE-2025-4517 (e.g. Python 3.13.4) is not enough. One additionally needs to upgrade Keras to a version with the fix (Keras 3.12).
references
0
reference_url https://github.com/keras-team/keras
reference_id
reference_type
scores
url https://github.com/keras-team/keras
1
reference_url https://github.com/keras-team/keras/commit/47fcb397ee4caffd5a75efd1fa3067559594e951
reference_id
reference_type
scores
url https://github.com/keras-team/keras/commit/47fcb397ee4caffd5a75efd1fa3067559594e951
2
reference_url https://github.com/keras-team/keras/pull/21760
reference_id
reference_type
scores
url https://github.com/keras-team/keras/pull/21760
3
reference_url https://huntr.com/bounties/f94f5beb-54d8-4e6a-8bac-86d9aee103f4
reference_id
reference_type
scores
url https://huntr.com/bounties/f94f5beb-54d8-4e6a-8bac-86d9aee103f4
4
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-12060
reference_id CVE-2025-12060
reference_type
scores
url https://nvd.nist.gov/vuln/detail/CVE-2025-12060
5
reference_url https://github.com/advisories/GHSA-28jp-44vh-q42h
reference_id GHSA-28jp-44vh-q42h
reference_type
scores
url https://github.com/advisories/GHSA-28jp-44vh-q42h
6
reference_url https://github.com/keras-team/keras/security/advisories/GHSA-hjqc-jx6g-rwp9
reference_id GHSA-hjqc-jx6g-rwp9
reference_type
scores
url https://github.com/keras-team/keras/security/advisories/GHSA-hjqc-jx6g-rwp9
fixed_packages
0
url pkg:pypi/keras@3.12.0
purl pkg:pypi/keras@3.12.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1xj9-1kng-8ua4
resource_url http://public2.vulnerablecode.io/packages/pkg:pypi/keras@3.12.0
aliases GHSA-28jp-44vh-q42h
risk_score null
exploitability null
weighted_severity null
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-c11z-ye25-k7eh
3
url VCID-h5tb-645a-3fdv
vulnerability_id VCID-h5tb-645a-3fdv
summary
Keras is vulnerable to arbitrary local file loading and Server-Side Request Forgery
The Keras.Model.load_model method, including when executed with the intended security mitigation safe_mode=True, is vulnerable to arbitrary local file loading and Server-Side Request Forgery (SSRF).


This vulnerability stems from the way the StringLookup layer is handled during model loading from a specially crafted .keras archive. The constructor for the StringLookup layer accepts a vocabulary argument that can specify a local file path or a remote file path.

*  Arbitrary Local File Read: An attacker can create a malicious .keras file that embeds a local path in the StringLookup layer's configuration. When the model is loaded, Keras will attempt to read the content of the specified local file and incorporate it into the model state (e.g., retrievable via get_vocabulary()), allowing an attacker to read arbitrary local files on the hosting system.


*  Server-Side Request Forgery (SSRF): Keras utilizes tf.io.gfile for file operations. Since tf.io.gfile supports remote filesystem handlers (such as GCS and HDFS) and HTTP/HTTPS protocols, the same mechanism can be leveraged to fetch content from arbitrary network endpoints on the server's behalf, resulting in an SSRF condition.


The security issue is that the feature allowing external path loading was not properly restricted by the safe_mode=True flag, which was intended to prevent such unintended data access.
references
0
reference_url https://github.com/keras-team/keras
reference_id
reference_type
scores
url https://github.com/keras-team/keras
1
reference_url https://github.com/keras-team/keras/commit/61ac8c1e51862c471dee7b49029c356f55531487
reference_id
reference_type
scores
url https://github.com/keras-team/keras/commit/61ac8c1e51862c471dee7b49029c356f55531487
2
reference_url https://github.com/keras-team/keras/pull/21751
reference_id
reference_type
scores
url https://github.com/keras-team/keras/pull/21751
3
reference_url https://www.cve.org/CVERecord?id=CVE-2025-12058
reference_id
reference_type
scores
url https://www.cve.org/CVERecord?id=CVE-2025-12058
4
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-12058
reference_id CVE-2025-12058
reference_type
scores
url https://nvd.nist.gov/vuln/detail/CVE-2025-12058
5
reference_url https://github.com/advisories/GHSA-mq84-hjqx-cwf2
reference_id GHSA-mq84-hjqx-cwf2
reference_type
scores
url https://github.com/advisories/GHSA-mq84-hjqx-cwf2
6
reference_url https://github.com/keras-team/keras/security/advisories/GHSA-qg93-c7p6-gg7f
reference_id GHSA-qg93-c7p6-gg7f
reference_type
scores
url https://github.com/keras-team/keras/security/advisories/GHSA-qg93-c7p6-gg7f
fixed_packages
0
url pkg:pypi/keras@3.12.0
purl pkg:pypi/keras@3.12.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1xj9-1kng-8ua4
resource_url http://public2.vulnerablecode.io/packages/pkg:pypi/keras@3.12.0
aliases CVE-2025-12058, GHSA-mq84-hjqx-cwf2
risk_score null
exploitability null
weighted_severity null
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-h5tb-645a-3fdv
Risk_scorenull
Resource_urlhttp://public2.vulnerablecode.io/packages/pkg:pypi/keras@3.12.0