{"document":{"category":"csaf_vex","csaf_version":"2.0","title":"CVE-2026-58116: LLaMA-Factory 0.9.5 Remote Code Execution via WebUI Model Path","publisher":{"category":"vendor","name":"HarborGuard Database","namespace":"https://database.harborguard.co"},"tracking":{"id":"CVE-2026-58116","status":"final","version":"1","initial_release_date":"2026-06-30T12:54:24.700Z","current_release_date":"2026-06-30T14:06:16.566Z","revision_history":[{"date":"2026-06-30T12:54:24.700Z","number":"1","summary":"Initial machine-readable export from HarborGuard."}]},"distribution":{"tlp":{"label":"WHITE"},"text":"Public CVE data; freely redistributable."},"notes":[{"category":"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.","title":"CVE description"}],"references":[{"category":"self","summary":"CVE-2026-58116 on HarborGuard Database","url":"https://database.harborguard.co/cve/CVE-2026-58116"},{"category":"external","summary":"CVE Record","url":"https://www.cve.org/CVERecord?id=CVE-2026-58116"},{"category":"external","summary":"Researcher Disclosure","url":"https://gist.github.com/henrrrychau/08d76ec672f42136bbc1449c4f2973f8"},{"category":"external","summary":"vulncheck.com","url":"https://www.vulncheck.com/advisories/llama-factory-remote-code-execution-via-webui-model-path"}]},"product_tree":{"branches":[{"category":"vendor","name":"hiyouga","branches":[{"category":"product_name","name":"LlamaFactory","branches":[{"category":"product_version_range","name":"<=0.9.5","product":{"name":"hiyouga LlamaFactory <=0.9.5","product_id":"CSAFPID-1","product_identification_helper":{"cpe":"cpe:2.3:a:hiyouga:llamafactory:*:*:*:*:*:*:*:*"}}}]}]}]},"vulnerabilities":[{"cve":"CVE-2026-58116","title":"LLaMA-Factory 0.9.5 Remote Code Execution via WebUI Model Path","notes":[{"category":"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.","title":"CVE description"}],"product_status":{"known_affected":["CSAFPID-1"]},"scores":[{"cvss_v4":{"version":"4.0","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","baseScore":9.3,"baseSeverity":"CRITICAL"},"products":["CSAFPID-1"]}],"remediations":[{"category":"none_available","details":"No fixed version is published yet. Monitor the upstream advisory.","product_ids":["CSAFPID-1"]}]}]}