9.3critical
LLaMA-Factory 0.9.5 Remote Code Execution via WebUI Model Path
- Severity
- 9.3critical CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.64% (higher than 52% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| hiyouga LlamaFactory | up to 0.9.5 | CVE List |
| hiyouga llama-factory | up to 0.9.5 | NVD |
All scores
| VulnCheck | 9.3critical CVSS:4.0 | 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 | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
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.
NVD (es)
LLaMA-Factory hasta la versión 0.9.5 contiene una vulnerabilidad de ejecución remota de código que permite a atacantes con acceso a la interfaz de usuario web (WebUI) ejecutar código Python arbitrario al proporcionar una ruta de modelo maliciosa en las interfaces de Chat o Entrenamiento. La aplicación pasa la entrada de la ruta del modelo proporcionada por el usuario sin validar a AutoTokenizer.from_pretrained() y AutoModel.from_pretrained() con un parámetro trust_remote_code=True codificado de forma rígida, lo que hace que la biblioteca Hugging Face transformers obtenga y ejecute código arbitrario desde un repositorio de modelos remoto o local con los privilegios del proceso del servidor.
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-58116 changed 2026-07-14 | CVE Terms of Use |
| NVD | CVE-2026-58116 changed 2026-10-25 | Public domain |