CVE-2025-46567 LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py
HighCVSS 7.8
EPSS 0.29%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
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.
Upgrade path
2 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| hiyouga LLaMA-Factory | < 1.0.0; = < 1.0.0 | 1.0.0 | Fixed |
| pypi llamafactory(PyPI) | < 0.9.3; <= 0.9.2; = 0.7.1; = 0.8.0 +6 more | 0.9.3 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi llamafactory(PyPI) | < 0.9.3 | 0.9.3 |
| pypi llamafactory(PyPI) | = 0.7.1 | No fix listed |
| pypi llamafactory(PyPI) | = 0.8.0 | No fix listed |
| pypi llamafactory(PyPI) | = 0.8.1 | No fix listed |
| pypi llamafactory(PyPI) | = 0.8.2 | No fix listed |
| pypi llamafactory(PyPI) | = 0.8.3 | No fix listed |
| pypi llamafactory(PyPI) | = 0.9.0 | No fix listed |
| pypi llamafactory(PyPI) | = 0.9.1 | No fix listed |
| pypi llamafactory(PyPI) | = 0.9.2 | No fix listed |
| pypi llamafactory(PyPI) | <= 0.9.2 | No fix listed |
| hiyouga LLaMA-Factory | = < 1.0.0 | No fix listed |
| hiyouga LLaMA-Factory | < 1.0.0 | 1.0.0 |
References
- https://github.com/hiyouga/LLaMA-Factory/security/advisories/GHSA-f2f7-gj54-6vpv exploit vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/hiyouga/LLaMA-Factory/commit/2989d39239d2f46e584c1e1180ba46b9768afb2a patch
- github.com product
- github.com
- pypi.org product
- github.com vendor-advisory