LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py
CVE-2025-46567 · GHSA-f2f7-gj54-6vpv · published 2025-04-23 · updated 2025-06-28
- Severity
- Medium
- CVSS score
- 6.1
- Chance of exploitation (EPSS)
- 0.29%
- Fixed in
- 0.9.3
- Exploitation Public proof of concept
- Automatable No
- Technical impact Partial
- CISA SSVC
Arbitrary command execution (RCE) System compromise Persistence or lateral movement in shared compute environments
Upgrade llamafactory to 0.9.3 or later.
Replace torch.load() with safer alternatives like safetensors. Validate and whitelist file types before deserialization. Require checksum validation.
Avoid running the script with untrusted .bin files. Use containers or VMs to isolate script execution.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| llamafactory | PyPI | <= 0.9.2 | 0.9.3 |
- CriticalLMDeploy has Remote Code Execution by Pickle Deserialization via handle_zmq_recv in lmdeploy/lmdeploy/pytorch/disagg/conn/engine_conn.pylmdeploy
- CriticalLMdeploy has Remote Code Execution by Pickle Deserialization via zmq_rpc.call_and_response() in InterLM/lmdeploylmdeploy
- CriticalSGLang: Unauthenticated RCE via --enable-custom-logit-processorsglang
- CriticalSGLanG: Multimodal scheduler deserializes untrusted pickle data on 0.0.0.0 ROUTER socketsglang
- Criticaln8n: HTTP Request Node Pagination Prototype Pollution to RCEn8n
- Criticaln8n Has an XML Node Prototype Pollution Patch Bypassn8n
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.