{"id":"CVE-2026-58116","published":"2026-06-30T12:54:24Z","modified":"2026-07-14T21:34:48Z","title":"LLaMA-Factory 0.9.5 Remote Code Execution via WebUI Model Path","vendor":"hiyouga","product":"LlamaFactory","tier":"tail","description":{"text":"LLaMA-Factory through 0.9.5 contains a remote code execution vulnerability that allows attackers with WebUI access to execute arbitrary Python code by supplying a malicious model path in the Chat or Training interfaces. The application passes user-supplied model path input unvalidated into AutoTokenizer.from_pretrained() and AutoModel.from_pretrained() with a hardcoded trust_remote_code=True parameter, causing the Hugging Face transformers library to fetch and execute arbitrary code from a remote or local model repository with the privileges of the server process.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00904,"percentile":0.60652,"provenance":"source"},"cwes":[{"id":"CWE-829","name":"Inclusion of Functionality from Untrusted Control Sphere"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://gist.github.com/henrrrychau/08d76ec672f42136bbc1449c4f2973f8","tags":["technical-description","exploit"]},{"url":"https://www.vulncheck.com/advisories/llama-factory-remote-code-execution-via-webui-model-path","tags":["third-party-advisory"]}],"priority":{"score":24.0,"factors":[{"name":"EPSS percentile","points":12.13},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.86}]},"vendorSlug":"hiyouga","affectedVersions":[{"vendor":"hiyouga","product":"LlamaFactory","versions":["<= 0.9.5"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2026-06-30T14:04:48.098673Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-40311","exploited":false,"provenance":"source"},"exploitRefs":["https://gist.github.com/henrrrychau/08d76ec672f42136bbc1449c4f2973f8"]}