CVE-2026-58116

CRITICAL CVSS 4.0: 9.3 EPSS 0.90%
Updated Oct 26, 2026
Hiyouga
Parameter Value
CVSS 9.3 (CRITICAL)
Affected Versions before 0.9.5
Type CWE-829 (Inclusion of Functionality from Untrusted Source), CWE-94 (Code Injection)
Vendor Hiyouga
Public PoC No

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.

Attack Parameters

Attack Vector
Network
Can be exploited remotely
Attack Complexity
Low
Easy to exploit
Attack Requirements
None
No additional conditions
Privileges Required
None
No privileges needed
User Interaction
None
No user interaction needed

Impact Assessment

Confidentiality
High
Complete data leak
Integrity
High
Complete data modification
Availability
High
Complete denial of service

CVSS Vector v4.0

Vulnerable Products 1

Configuration From (including) Up to (excluding)
Hiyouga Llama-Factory
cpe:2.3:a:hiyouga:llama-factory:*:*:*:*:*:*:*:*
— <= 0.9.5

Related Vulnerabilities