CVE-2026-58116CWE-829CWE-94

LLaMA-Factory 0.9.5 Remote Code Execution via WebUI Model Path

Critical · published June 30, 2026

CVSS v4.0
9.3
EPSS
1%
Percentile
59.4
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v4.0
9.3 · CRITICAL
Vector
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
EPSS
0.00904 · 59.4th percentile
Weaknesses
CWE-829 · Inclusion of Functionality from Untrusted Control Sphere; CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2026-06-30T12:54Z
EPSS history
Timeline
  • 30 JUN 12:54Z
    LLaMA-Factory 0.9.5 Remote Code Execution via WebUI Model Path
    cvelistv5