{"id":"CVE-2025-46567","published":"2025-05-01T17:20:41Z","modified":"2025-05-02T17:29:45Z","title":"LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py","vendor":"hiyouga","product":"LLaMA-Factory","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00693,"percentile":0.48224,"provenance":"source"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"references":[{"url":"https://github.com/hiyouga/LLaMA-Factory/security/advisories/GHSA-f2f7-gj54-6vpv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/hiyouga/LLaMA-Factory/commit/2989d39239d2f46e584c1e1180ba46b9768afb2a","tags":["x_refsource_MISC"]}],"priority":{"score":13.9,"factors":[{"name":"EPSS percentile","points":9.64},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"hiyouga","affectedVersions":[{"vendor":"hiyouga","product":"LLaMA-Factory","versions":["< 1.0.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-05-02T17:29:42.693942Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"llamafactory","vulnerableRanges":["<0.9.3"],"patched":["0.9.3"],"from":["GHSA-f2f7-gj54-6vpv","PYSEC-2026-1574"],"provenance":"source"}],"summary":{"text":"LLaMA-Factory (by hiyouga), in its llamafy_baichuan2.py script, performs unsafe deserialization via torch.load() on user-supplied .bin files from an input directory, before version 1.0.0. An attacker who supplies a crafted .bin file can execute arbitrary commands when it is deserialized, which requires local access, low privileges, and a user to run the script against that input directory.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:10:20Z"},"euvd":{"id":"EUVD-2025-12156","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2024-52803","published":"2024-11-21","fixed":"0.9.1","kev":false,"link":{"from":"CVE-2024-52803","to":"CVE-2025-46567","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:llamafactory","fromFixed":"0.9.1","toFixed":"0.9.3","daysApart":161}]}},{"cve":"CVE-2025-46567","published":"2025-05-01","fixed":"0.9.3","kev":false},{"cve":"CVE-2025-61784","published":"2025-10-07","fixed":"0.9.4","kev":false,"link":{"from":"CVE-2025-46567","to":"CVE-2025-61784","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:llamafactory","fromFixed":"0.9.3","toFixed":"0.9.4","daysApart":159}]}}],"package":"PyPI:llamafactory"}}