{"answers":{"affected":"3 open source packages ship an affected version, including keras.","exploited":"There is no known exploitation of CVE-2025-12060 in the wild and no public exploit code.","fix":"Upgrade keras to 3.12.0 or later.","what":"CVE-2025-12060 is a high-severity path traversal vulnerability in Keras, published on 30 Oct 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-12060 and fix it if it is affected.\n\nWhat it is: CVE-2025-12060 is a high-severity path traversal vulnerability in Keras, published on 30 Oct 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2025-12060 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- keras (PyPI): affected all versions; fixed in 3.12.0\n- keras (PyPI): affected all versions; fixed in 3.12.0\n- keras (PyPI): affected all versions; fixed in 3.12.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-12060/ (Markdown: https://insights.sbomify.com/CVE-2025-12060/index.md)","id":"CVE-2025-12060","markdown":"https://insights.sbomify.com/CVE-2025-12060/index.md","name":"CVE-2025-12060","record":{"aliases":["AZL-69472","CLSA-2026-1787149068","DEBIAN-CVE-2025-12060","GHSA-hjqc-jx6g-rwp9","MINI-5g32-8rrh-h62w","PYSEC-2026-1486","UBUNTU-CVE-2025-12060"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":true,"product_category":"Keras deep learning library","requires_auth":"low_privilege","summary":"Remote attackers can write arbitrary files to the filesystem via malicious tar archives in Keras get_file utility when extract option is enabled.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Google","cpe":[],"cvss":{"score":8.9,"severity":"high","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","version":"4.0"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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).","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Keras keras.utils.get_file Utility Path Traversal Vulnerability","id":"CVE-2025-12060","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2025"},"n_packages":3,"n_references":2,"next":{"headline":"Tax Service Electronic HDM \u003c 1.2.1 - Unauthenticated Arbitrary SQL Execution","id":"CVE-2025-12061"},"packages":[{"ecosystem":"PyPI","fixed":["3.12.0"],"introduced":["0"],"last_affected":[],"package":"keras","purl":null,"source":"GHSA-hjqc-jx6g-rwp9"},{"ecosystem":"PyPI","fixed":["3.12.0"],"introduced":["0"],"last_affected":[],"package":"keras","purl":"pkg:pypi/keras","source":"GHSA-hjqc-jx6g-rwp9"},{"ecosystem":"PyPI","fixed":["3.12.0"],"introduced":["0"],"last_affected":[],"package":"keras","purl":"pkg:pypi/keras","source":"PYSEC-2026-1486"}],"prev":{"headline":"Improper Access Control in Logo Software's Logo j-Platform","id":"CVE-2025-12059"},"products":["Keras"],"published":"2025-10-30","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-02-26","vendors":["Keras"]},"summary":"Remote attackers can write arbitrary files to the filesystem via malicious tar archives in Keras get_file utility when extract option is enabled.","url":"https://insights.sbomify.com/CVE-2025-12060/"}