CVE-2024-52803
Hiyouga Llama-factory vulnerability
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
Llama-factory. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Hiyouga Llama-factory runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/hiyouga/LLaMA-Factory/security/advisories/GHSA-hj3w-wrh4-44vp · Exploit
- github.com/hiyouga/LLaMA-Factory/commit/b3aa80d54a67da45e9e237e349486fb9c162b2ac · Patch
- gist.github.com/superboy-zjc/f2d2b93ae511c445ba97e144b70e534d · Exploit
- nvd.nist.gov/vuln/detail/CVE-2024-52803
- github.com/advisories/GHSA-hj3w-wrh4-44vp
- nvd.nist.gov/vuln/detail/CVE-2024-52803
- cve.org/CVERecord?id=CVE-2024-52803
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.