Critical RCE in LLaMA-Factory WebUI via Malicious Model Path
A critical remote code execution vulnerability, tracked as CVE-2026-58116, affects LLaMA-Factory through version 0.9.5. The flaw is in the WebUI Chat and Training interfaces, where user-supplied Model path input is passed to Hugging Face model-loading functions with trust_remote_code=True, allowing attacker-controlled code from a remote or local model repository to run with the privileges of the server process. Public reporting said the issue is remotely exploitable and carries a CVSS 3.1 score of 9.8 and CVSS 4.0 score of 9.3.
The vulnerability was publicly described as a model path injection issue that can be triggered by pointing the WebUI at a malicious Hugging Face repository containing crafted Python files executed during model loading. Reports said there is no UI option or configuration setting to disable the unsafe behavior in affected versions, expanding exposure across both interfaces. Recommended mitigations include updating LLaMA-Factory, sanitizing model path input, disabling trust_remote_code where possible, and restricting WebUI access to authorized users only.

Get ahead of threats like this
Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
How this story unfolded
1 event from the most recent confirmed update back to the earliest known activity.
CVE-2026-58116 disclosed for LLaMA-Factory WebUI RCE
A critical remote code execution vulnerability affecting LLaMA-Factory through version 0.9.5 was publicly disclosed as CVE-2026-58116. The flaw allows attacker-controlled model path input in the WebUI Chat and Training interfaces to trigger arbitrary Python code execution via Hugging Face model loading with trust_remote_code enabled.
Related entities
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
Sources
2 references tracked. Mallory keeps watching after this page renders.
See the full picture, correlated to your attack surface.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.


