What’s Vulnerable › Vulnerabilities
CVE-2024-52803: LLama Factory Remote OS Command Injection Vulnerability
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.3% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2024-11-21 · updated 2026-06-17
- Weakness: CWE-79
Description
LLama Factory enables fine-tuning of large language models. A critical remote OS command injection vulnerability has been identified in the LLama Factory training process. This vulnerability arises from improper handling of user input, allowing malicious actors to execute arbitrary OS commands on the host system. The issue is caused by insecure usage of the `Popen` function with `shell=True`, coupled with unsanitized user input. Immediate remediation is required to mitigate the risk. This vulnerability is fixed in 0.9.1.
Affected products
- hiyouga LLaMA-Factory: before 0.9.1 — fixed in 0.9.1
How to fix
Upgrade to a fixed version: hiyouga LLaMA-Factory 0.9.1. Check the vendor advisory for mitigations.
References
- https://gist.github.com/superboy-zjc/f2d2b93ae511c445ba97e144b70e534d
- https://github.com/hiyouga/LLaMA-Factory/commit/b3aa80d54a67da45e9e237e349486fb9c162b2ac
- https://github.com/hiyouga/LLaMA-Factory/security/advisories/GHSA-hj3w-wrh4-44vp
Get alerted when CVE-2024-52803 or the next vulnerability affects your stack