{"answers":{"affected":"3 open source packages ship an affected version, including llamafactory. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-53002 exists.","fix":"No fix has been published for CVE-2025-53002 yet. Limit exposure of the affected software until one is available.","what":"CVE-2025-53002 is a high-severity unsafe deserialization vulnerability in hiyouga LLaMA-Factory, published on 26 Jun 2025. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-53002 and fix it if it is affected.\n\nWhat it is: CVE-2025-53002 is a high-severity unsafe deserialization vulnerability in hiyouga LLaMA-Factory, published on 26 Jun 2025. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-53002 exists.\n\nAffected packages and fixed versions:\n- llamafactory (PyPI): affected all versions up to 0.9.3; no fix listed\n- llamafactory (PyPI): affected all versions up to 0.9.3; no fix listed\n- llamafactory (PyPI): affected all versions up to 0.9.3; no fix listed\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-53002/ (Markdown: https://insights.sbomify.com/CVE-2025-53002/index.md)","id":"CVE-2025-53002","markdown":"https://insights.sbomify.com/CVE-2025-53002/index.md","name":"CVE-2025-53002","record":{"aliases":["GHSA-xj56-p8mm-qmxj","PYSEC-2026-1576"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"LLM tuning library","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary code on the host system by providing a malicious checkpoint path via the WebUI interface in LLaMA-Factory.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"llama-factory","vendor":"hiyouga"}],"cvss":{"score":8.3,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"description":"LLaMA-Factory is a tuning library for large language models. A remote code execution vulnerability was discovered in LLaMA-Factory versions up to and including 0.9.3 during the LLaMA-Factory training process. This vulnerability arises because the `vhead_file` is loaded without proper safeguards, allowing malicious attackers to execute arbitrary malicious code on the host system simply by passing a malicious `Checkpoint path` parameter through the `WebUI` interface. The attack is stealthy, as the victim remains unaware of the exploitation. The root cause is that the `vhead_file` argument is loaded without the secure parameter `weights_only=True`. Version 0.9.4 contains a fix for the issue.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":false,"headline":"LLaMA-Factory Remote Code Execution (RCE) Vulnerability","id":"CVE-2025-53002","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"deserialization","year":"2025"},"n_packages":3,"n_references":3,"next":{"headline":"Janssen Config API returns results without scope verification","id":"CVE-2025-53003"},"packages":[{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["0.9.3"],"package":"llamafactory","purl":null,"source":"GHSA-xj56-p8mm-qmxj"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["0.9.3"],"package":"llamafactory","purl":"pkg:pypi/llamafactory","source":"GHSA-xj56-p8mm-qmxj"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["0.9.3"],"package":"llamafactory","purl":"pkg:pypi/llamafactory","source":"PYSEC-2026-1576"}],"prev":{"headline":"Reason: This candidate was issued in error.","id":"CVE-2025-53001"},"products":["LLaMA-Factory"],"published":"2025-06-26","related":[{"cvss_score":9.3,"headline":"LLaMA-Factory 0.9.5 Remote Code Execution via WebUI Model Path","id":"CVE-2026-58116","kev_date_added":null,"published":"2026-06-30"},{"cvss_score":7.6,"headline":"LLaMA Factory's Chat API has Critical SSRF and LFI Vulnerabilities","id":"CVE-2025-61784","kev_date_added":null,"published":"2025-10-07"},{"cvss_score":7.5,"headline":"LLama Factory Remote OS Command Injection Vulnerability","id":"CVE-2024-52803","kev_date_added":null,"published":"2024-11-21"},{"cvss_score":6.1,"headline":"LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py","id":"CVE-2025-46567","kev_date_added":null,"published":"2025-05-01"}],"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":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-06-26","vendors":["hiyouga"]},"summary":"Attackers can execute arbitrary code on the host system by providing a malicious checkpoint path via the WebUI interface in LLaMA-Factory.","url":"https://insights.sbomify.com/CVE-2025-53002/"}