CVE Watchtower

CVE-2026-58116hiyouga LlamaFactory Inclusion of Functionality from Untrusted Control Sphere

NVD

Vulnerability 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.
Severity Level
CRITICAL(9.8)
Published Date
Jun 30, 2026
Last Modified
Jul 14, 2026
Exploitation Status
Public exploit available
EPSS Score (30-Day)
0.64%Probability
Root Weakness (CWE)
The product imports, requires, or includes executable functionality from a source that is outside of the intended control sphere.
The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended syntax or behavior.
CVSS v4.0 Base Metrics — Score 9.3 (CRITICAL)
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Attack VectorNetwork
Attack ComplexityLow
Attack RequirementsNone
Privileges RequiredNone
User InteractionNone
Confidentiality (Vulnerable System)High
Integrity (Vulnerable System)High
Availability (Vulnerable System)High
Confidentiality (Subsequent System)None
Integrity (Subsequent System)None
Availability (Subsequent System)None
Show CVSS v3.x metrics (score 9.8)
CVSS v3.1 Base Metrics — Score 9.8 (CRITICAL)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

Affected & Patched Versions

Affected Versions
  • hiyouga LlamaFactory <= 0.9.5
Patched Versions
  • hiyouga LlamaFactory 0.9.5

What to do

Prioritize this fix. Exploit code is public, so attacks can follow quickly.

  1. Check whether you run hiyouga LlamaFactory and which version.
  2. Update to a patched version listed above, then confirm the new version.
  3. Review logs and exposed services for signs of earlier compromise.

Timeline

  • Jun 30, 2026Published
  • Jul 14, 2026Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new hiyouga LlamaFactory CVEsYou are reading CVE-2026-58116. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

Data last checked: Nov 22, 2026 17:11 UTC