{"answers":{"affected":"3 open source packages ship an affected version, including llamafactory. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-52803 exists.","fix":"Upgrade llamafactory to 0.9.1 or later.","what":"CVE-2024-52803 is a high-severity command injection vulnerability in hiyouga LLaMA-Factory, published on 21 Nov 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-52803 and fix it if it is affected.\n\nWhat it is: CVE-2024-52803 is a high-severity command injection vulnerability in hiyouga LLaMA-Factory, published on 21 Nov 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-52803 exists.\n\nAffected packages and fixed versions:\n- llamafactory (PyPI): affected all versions; fixed in 0.9.1\n- llamafactory (PyPI): affected all versions; fixed in 0.9.1\n- llamafactory (PyPI): affected all versions; fixed in 0.9.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-52803/ (Markdown: https://insights.sbomify.com/CVE-2024-52803/index.md)","id":"CVE-2024-52803","markdown":"https://insights.sbomify.com/CVE-2024-52803/index.md","name":"CVE-2024-52803","record":{"aliases":["GHSA-hj3w-wrh4-44vp","PYSEC-2026-1575"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"LLM fine-tuning library","requires_auth":"none","summary":"Attackers can execute arbitrary OS commands on the host system via unsanitized input in the training process of this LLM fine-tuning library.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"llama-factory","vendor":"hiyouga"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"},{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"LLama Factory Remote OS Command Injection Vulnerability","id":"CVE-2024-52803","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"command_injection","year":"2024"},"n_packages":3,"n_references":3,"next":{"headline":"Tornado has HTTP cookie parsing DoS vulnerability","id":"CVE-2024-52804"},"packages":[{"ecosystem":"PyPI","fixed":["0.9.1"],"introduced":["0"],"last_affected":[],"package":"llamafactory","purl":null,"source":"GHSA-hj3w-wrh4-44vp"},{"ecosystem":"PyPI","fixed":["0.9.1"],"introduced":["0"],"last_affected":[],"package":"llamafactory","purl":"pkg:pypi/llamafactory","source":"GHSA-hj3w-wrh4-44vp"},{"ecosystem":"PyPI","fixed":["0.9.1"],"introduced":["0"],"last_affected":[],"package":"llamafactory","purl":"pkg:pypi/llamafactory","source":"PYSEC-2026-1575"}],"prev":{"headline":"RIOT-OS missing dhcpv6_opt_t minimum header length check","id":"CVE-2024-52802"},"products":["LLaMA-Factory"],"published":"2024-11-21","related":[{"cvss_score":9.3,"headline":"LLaMA-Factory 0.9.5 Remote Code Execution via WebUI Model Path","id":"CVE-2026-58116","kev_date_added":null,"published":"2026-06-30"},{"cvss_score":8.3,"headline":"LLaMA-Factory Remote Code Execution (RCE) Vulnerability","id":"CVE-2025-53002","kev_date_added":null,"published":"2025-06-26"},{"cvss_score":7.6,"headline":"LLaMA Factory's Chat API has Critical SSRF and LFI Vulnerabilities","id":"CVE-2025-61784","kev_date_added":null,"published":"2025-10-07"},{"cvss_score":6.1,"headline":"LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py","id":"CVE-2025-46567","kev_date_added":null,"published":"2025-05-01"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-11-21","vendors":["hiyouga"]},"summary":"Attackers can execute arbitrary OS commands on the host system via unsanitized input in the training process of this LLM fine-tuning library.","url":"https://insights.sbomify.com/CVE-2024-52803/"}