CVE-2026-58116
CVE-2026-58116 is a critical-severity vulnerability in Hiyouga Llama-factory with a CVSS 3.x base score of 9.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-94.
Key facts
- Severity: Critical (CVSS 3.x base score 9.8)
- CVSS v4: 9.3
- EPSS exploit prediction: 0% (39th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-94
- Affected product: Hiyouga Llama-factory
- Published:
- Last modified:
Description
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.
Frequently asked questions
- What is CVE-2026-58116?
- 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.
- How severe is CVE-2026-58116?
- CVE-2026-58116 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2026-58116 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (39th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2026-58116?
- CVE-2026-58116 affects Hiyouga Llama-factory. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2026-58116?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- When was CVE-2026-58116 published?
- CVE-2026-58116 was published on 2026-06-30 and last updated on 2026-07-01.
References
- https://gist.github.com/henrrrychau/08d76ec672f42136bbc1449c4f2973f8
- https://www.vulncheck.com/advisories/llama-factory-remote-code-execution-via-webui-model-path
Affected products (1)
- cpe:2.3:a:hiyouga:llama-factory:*:*:*:*:*:*:*:*
More vulnerabilities in Hiyouga Llama-factory
- CVE-2025-53002 — High (CVSS 8.3): LLaMA-Factory is a tuning library for large language models. A remote code execution vulnerability was discovered in…
- CVE-2025-61784 — High (CVSS 7.6): LLaMA-Factory is a tuning library for large language models. Prior to version 0.9.4, a Server-Side Request Forgery…
- CVE-2024-52803 — High (CVSS 7.5): LLama Factory enables fine-tuning of large language models. A critical remote OS command injection vulnerability has…
- CVE-2025-46567 — Medium (CVSS 6.1): LLama Factory enables fine-tuning of large language models. Prior to version 1.0.0, a critical vulnerability exists in…
All CVEs affecting Hiyouga Llama-factory →
Other CWE-94 (Code Injection) vulnerabilities
- CVE-2026-57624 — Critical (CVSS 10.0): Unauthenticated Remote Code Execution (RCE) in Blocksy Companion Pro <= 2.1.46 versions.
- CVE-2026-10134 — Critical (CVSS 10.0): IBM Langflow OSS 1.0.0 through 1.9.3 allows an attacker to read every secret available to the Langflow process, read…
- CVE-2026-53576 — Critical (CVSS 10.0): Kestra is an open-source, event-driven orchestration platform. Prior to 1.0.45 and 1.3.21, the authentication filter…
- CVE-2026-10561 — Critical (CVSS 10.0): IBM Langflow OSS 1.0.0 through 1.9.3 has an vulnerability due to an improper isolation of Python execution combined…
- CVE-2026-25470 — Critical (CVSS 10.0): Improper Control of Generation of Code ('Code Injection') vulnerability in ACPT ACPT (Pro) - Custom Post Types Plugin…
- CVE-2026-48836 — Critical (CVSS 10.0): Unauthenticated Remote Code Execution (RCE) in Easy Invoice <= 2.1.19 versions.