LLaMA-Factory 0.9.5 Remote Code Execution via WebUI Model Path
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- No fix listed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-829.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
No fixed version listed by the sources yet.
Timeline
- 2026-10-02 Threatist record created from CVE-2026-58116
- 2026-10-03 Alias added: GHSA-mwc7-mf87-v3mf
References
Exploit 1
More hiyouga Llama-factory vulnerabilities
- TI-2024-35316 LLama Factory Remote OS Command Injection Vulnerability CVSS 3.1CRITICAL 9.8
- TI-2025-33006 LLaMA-Factory Remote Code Execution (RCE) Vulnerability CVSS 3.1CRITICAL 9.8
- TI-2025-38177 LLaMA Factory's Chat API has Critical SSRF and LFI Vulnerabilities CVSS 3.1HIGH 8.1
- TI-2025-29280 LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py CVSS 3.1HIGH 7.8
Sources
- CVE-2026-58116 · CVE Program
- CVE-2026-58116 · NVD
- FIRST EPSS
- GHSA-mwc7-mf87-v3mf · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences