# CVE-2024-52803: LLama Factory Remote OS Command Injection Vulnerability

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.32%, higher than 83% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2024-11-21T16:53:18.398Z
- Modified: 2026-07-07T17:57:01.974Z
- Also known as: GHSA-hj3w-wrh4-44vp, PYSEC-2026-1575
- Weaknesses: CWE-78, CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- hiyouga LLaMA-Factory: < 0.9.1; before 0.9.1
- llama-factory llama-factory: before 0.9.1
- llamafactory (PyPI): before 0.9.1

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/hiyouga/LLaMA-Factory/security/advisories/GHSA-hj3w-wrh4-44vp> (exploit, vendor-advisory, web)
- <https://gist.github.com/superboy-zjc/f2d2b93ae511c445ba97e144b70e534d> (exploit, web)
- <https://github.com/hiyouga/LLaMA-Factory/commit/b3aa80d54a67da45e9e237e349486fb9c162b2ac> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-52803> (advisory)
- <https://github.com/hiyouga/LLaMA-Factory> (package)
- <https://pypi.org/project/llamafactory> (package)
- <https://github.com/advisories/GHSA-hj3w-wrh4-44vp> (advisory)

## Sources

- CVE List: [CVE-2024-52803](https://www.cve.org/CVERecord?id=CVE-2024-52803), CVE Terms of Use, modified 2024-11-21
- GitHub Advisory Database: [GHSA-hj3w-wrh4-44vp](https://github.com/advisories/GHSA-hj3w-wrh4-44vp), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2024-52803](https://nvd.nist.gov/vuln/detail/CVE-2024-52803), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1575](https://osv.dev/vulnerability/PYSEC-2026-1575), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2024-52803 · Whole record: https://cve.day/CVE-2024-52803.json · Rebuilt by cve.day 2026-11-25T22:58:49.009Z
