Remote Code Execution Vulnerability in LLaMA-Factory by Hugging Face
CVE-2026-58116
Key Information:
- Vendor
Hiyouga
- Status
- Vendor
- CVE Published:
- 30 June 2026
Badges
What is CVE-2026-58116?
LLaMA-Factory versions up to 0.9.5 are susceptible to a remote code execution vulnerability that enables users with WebUI access to run arbitrary Python code. This occurs when a malicious model path is provided in the Chat or Training interfaces, allowing the application to pass unsanitized user input to functions within the Hugging Face transformers library. Specifically, the vulnerability exploits the AutoTokenizer.from_pretrained() and AutoModel.from_pretrained() functions that include a hardcoded trust_remote_code=True parameter, leading to the execution of potentially harmful code from a remote or local model repository under the server's process privileges.
Affected Version(s)
LlamaFactory 0 <= 0.9.5
Exploit Proof of Concept (PoC)
PoC code is written by security researchers to demonstrate the vulnerability can be exploited. PoC code is also a key component for weaponization which could lead to ransomware.
References
CVSS V4
Timeline
- ๐ก
Public PoC available
- ๐พ
Exploit known to exist
Vulnerability published
Vulnerability Reserved
