LLama Factory Remote OS Command Injection Vulnerability
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Cross-site scripting, Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-79 and CWE-78.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| hiyouga | LLaMA-Factory | before 0.9.1 | 0.9.1 | Patch available | CNA |
| — | llamafactory (PyPI) | before 0.9.1 | 0.9.1 | Patch available | GHSA-hj3w-wrh4-44vp |
- LLaMA-Factory Vendorhiyouga Affected before 0.9.1 Fixed in 0.9.1 Patch available CNA
- llamafactory (PyPI) Vendor— Affected before 0.9.1 Fixed in 0.9.1 Patch available GHSA-hj3w-wrh4-44vp
Remediation
- Fix · CNA LLaMA-Factory (hiyouga) Fixed in 0.9.1
- Fix · GHSA-hj3w-wrh4-44vp llamafactory (PyPI) Fixed in 0.9.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-52803
- 2026-10-03 Alias added: GHSA-hj3w-wrh4-44vp
References
Exploit 2
More hiyouga Llama-factory vulnerabilities
- TI-2026-41855 LLaMA-Factory 0.9.5 Remote Code Execution via WebUI Model Path CVSS 4.0CRITICAL 9.3
- TI-2025-33006 LLaMA-Factory Remote Code Execution (RCE) Vulnerability CVSS 3.1CRITICAL 9.8
- TI-2025-38177 LLaMA Factory's Chat API has Critical SSRF and LFI Vulnerabilities CVSS 3.1HIGH 8.1
- TI-2025-29280 LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py CVSS 3.1HIGH 7.8
Sources
- CVE-2024-52803 · CVE Program
- CVE-2024-52803 · NVD
- FIRST EPSS
- GHSA-hj3w-wrh4-44vp · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences