Remote Code Execution Vulnerability in LLaMA-Factory by Hugging Face
CVE-2026-58116

9.3CRITICAL

Key Information:

Vendor

Hiyouga

Vendor
CVE Published:
30 June 2026

Badges

๐Ÿ‘พ Exploit Exists๐ŸŸก Public PoC

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

Score:
9.3
Severity:
CRITICAL
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Attack Required:
None
Privileges Required:
Undefined
User Interaction:
None

Timeline

  • ๐ŸŸก

    Public PoC available

  • ๐Ÿ‘พ

    Exploit known to exist

  • Vulnerability published

  • Vulnerability Reserved

Credit

h3nrrrych4u
.