CVE-2024-52803
Published: 21 November 2024
Summary
CVE-2024-52803 is a high-severity Cross-site Scripting (CWE-79) vulnerability in Hiyouga Llama-Factory. Its CVSS base score is 7.5 (High).
Operationally, ranked in the top 12.6% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.
Deeper analysis
Llama Factory, a tool for fine-tuning large language models, is affected by CVE-2024-52803, a remote OS command injection vulnerability in the training process. The issue results from unsafe invocation of Python's Popen function with shell=True and a lack of input sanitization, which permits arbitrary operating-system commands to be executed on the host. The flaw carries a CVSS 3.1 score of 7.5 and is also associated with CWE-78 and CWE-79.
An unauthenticated attacker with network access can supply crafted input during the training workflow to run commands on the underlying system, resulting in disclosure of sensitive data without any user interaction or authentication.
The project has published a security advisory and a fixing commit; the vulnerability is resolved in release 0.9.1.
The software is commonly used in AI/ML pipelines for LLM customization. Its EPSS score rose from a low baseline to a peak of 0.0542 before receding to the current value of 0.0324.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2024-3357
Vulnerability details
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…
more
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.
- CWE(s)
Related Threats
No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.
Affected Assets
Mitigating Controls
Likely Mitigating Controls AI
Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.
Validates inputs to block special elements that would alter OS command execution.
Penetration testing submits XSS payloads to web applications, detecting cross-site scripting flaws for subsequent remediation.
Platform-independent apps typically execute inside a managed runtime or sandbox that restricts direct OS command execution, reducing the ability to exploit OS command injection.
Output validation against expected content can reject or sanitize script content in generated web pages, reducing XSS exploitability.