CVE-2026-58116
JSON

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 packageVersionsReported by
hiyouga LlamaFactoryup to 0.9.5CVE List
hiyouga llama-factoryup to 0.9.5NVD

All scores

VulnCheck9.3critical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
VulnCheck9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-94CWE-829

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.

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

Sources

SourceRecordLicence
CVE ListCVE-2026-58116 changed 2026-07-14CVE Terms of Use
NVDCVE-2026-58116 changed 2026-10-25Public domain