# CVE-2026-58116: LLaMA-Factory 0.9.5 Remote Code Execution via WebUI Model Path

- Severity: Critical 9.3 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.64%, higher than 52% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-30T12:54:24.700Z
- Modified: 2026-10-25T21:10:00.770Z
- Weaknesses: CWE-94, CWE-829
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: VulnCheck

## Description

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.

(As written by CVE List.)

## Affected

- hiyouga LlamaFactory: up to 0.9.5
- hiyouga llama-factory: up to 0.9.5

## Every score

- VulnCheck: CVSS:4.0 9.3 Critical `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`
- VulnCheck: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://gist.github.com/henrrrychau/08d76ec672f42136bbc1449c4f2973f8> (exploit, mitigation, technical-description, third-party-advisory)
- <https://www.vulncheck.com/advisories/llama-factory-remote-code-execution-via-webui-model-path> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-58116](https://www.cve.org/CVERecord?id=CVE-2026-58116), CVE Terms of Use, modified 2026-07-14
- NVD: [CVE-2026-58116](https://nvd.nist.gov/vuln/detail/CVE-2026-58116), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-58116 · Whole record: https://cve.day/CVE-2026-58116.json · Rebuilt by cve.day 2026-11-25T22:59:26.697Z
