{"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-46567 exists.","fix":"Upgrade llamafactory to 0.9.3 or later.","what":"CVE-2025-46567 is a medium-severity unsafe deserialization vulnerability in hiyouga LLaMA-Factory, published on 1 May 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-46567 and fix it if it is affected.\n\nWhat it is: CVE-2025-46567 is a medium-severity unsafe deserialization vulnerability in hiyouga LLaMA-Factory, published on 1 May 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-46567 exists.\n\nAffected packages and fixed versions:\n- llamafactory (PyPI): affected all versions; fixed in 0.9.3\n- llamafactory (PyPI): affected all versions; fixed in 0.9.3\n- llamafactory (PyPI): affected all versions; fixed in 0.9.3\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-46567/ (Markdown: https://insights.sbomify.com/CVE-2025-46567/index.md)","id":"CVE-2025-46567","markdown":"https://insights.sbomify.com/CVE-2025-46567/index.md","name":"CVE-2025-46567","record":{"aliases":["GHSA-f2f7-gj54-6vpv","PYSEC-2026-1574"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"LLaMA-Factory library","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary code by providing malicious .bin files to the LLaMA-Factory library due to unsafe deserialization.","user_interaction":"required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"llama-factory","vendor":"hiyouga"}],"cvss":{"score":6.1,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"description":"LLama Factory enables fine-tuning of large language models. Prior to version 1.0.0, a critical vulnerability exists in the `llamafy_baichuan2.py` script of the LLaMA-Factory project. The script performs insecure deserialization using `torch.load()` on user-supplied `.bin` files from an input directory. An attacker can exploit this behavior by crafting a malicious `.bin` file that executes arbitrary commands during deserialization. This issue has been patched in version 1.0.0.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py","id":"CVE-2025-46567","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"deserialization","year":"2025"},"n_packages":3,"n_references":2,"next":{"headline":"Stirling-PDF Server-Side Request Forgery (SSRF)-Induced Arbitrary File Read Vulnerability","id":"CVE-2025-46568"},"packages":[{"ecosystem":"PyPI","fixed":["0.9.3"],"introduced":["0"],"last_affected":[],"package":"llamafactory","purl":null,"source":"GHSA-f2f7-gj54-6vpv"},{"ecosystem":"PyPI","fixed":["0.9.3"],"introduced":["0"],"last_affected":[],"package":"llamafactory","purl":"pkg:pypi/llamafactory","source":"GHSA-f2f7-gj54-6vpv"},{"ecosystem":"PyPI","fixed":["0.9.3"],"introduced":["0"],"last_affected":[],"package":"llamafactory","purl":"pkg:pypi/llamafactory","source":"PYSEC-2026-1574"}],"prev":{"headline":"Dataease redshift JDBC Connection Remote Code Execution","id":"CVE-2025-46566"},"products":["LLaMA-Factory"],"published":"2025-05-01","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":8.3,"headline":"LLaMA-Factory Remote Code Execution (RCE) Vulnerability","id":"CVE-2025-53002","kev_date_added":null,"published":"2025-06-26"},{"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"}],"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-05-02","vendors":["hiyouga"]},"summary":"Attackers can execute arbitrary code by providing malicious .bin files to the LLaMA-Factory library due to unsafe deserialization.","url":"https://insights.sbomify.com/CVE-2025-46567/"}