Read the docs
TI-2025-29280 Aliases CVE-2025-46567GHSA-f2f7-gj54-6vpv

LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py

Priority HIGH 67CWE-502Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-502.

Summary

LLama Factory enables fine-tuning of large language models. Prior to version 1.0.0, a critical vulnerability exists in the `llamafy_baichuan2.py` script of the LLaMA-Factory project. The script performs insecure deserialization using `torch.load()` on user-supplied `.bin` files from an input directory. An attacker can exploit this behavior by crafting a malicious `.bin` file that executes arbitrary commands during deserialization. This issue has been patched in version 1.0.0.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00285 21st percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed LLaMA-Factory (hiyouga): 1.0.0llamafactory (PyPI): 0.9.3

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
hiyougaLLaMA-Factorybefore 1.0.01.0.0Patch availableCNA
—llamafactory (PyPI)before 0.9.30.9.3Patch availableGHSA-f2f7-gj54-6vpv
  • LLaMA-Factory Vendorhiyouga Affected before 1.0.0 Fixed in 1.0.0 Patch available CNA
  • llamafactory (PyPI) Vendor— Affected before 0.9.3 Fixed in 0.9.3 Patch available GHSA-f2f7-gj54-6vpv

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:hiyouga:llama-factory:*:*:*:*:*:*:*:*before 1.0.0Vulnerablehiyouga
  • cpe:2.3:a:hiyouga:llama-factory:*:*:*:*:*:*:*:* Versions before 1.0.0 Vulnerable ·hiyouga

Remediation

  • Fix · CNA LLaMA-Factory (hiyouga) Fixed in 1.0.0
  • Fix · GHSA-f2f7-gj54-6vpv llamafactory (PyPI) Fixed in 0.9.3 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-46567
  2. 2026-10-03 Alias added: GHSA-f2f7-gj54-6vpv

References

  • TI-2026-41855 LLaMA-Factory 0.9.5 Remote Code Execution via WebUI Model Path CVSS 4.0CRITICAL 9.3
  • TI-2024-35316 LLama Factory Remote OS Command Injection Vulnerability CVSS 3.1CRITICAL 9.8
  • TI-2025-33006 LLaMA-Factory Remote Code Execution (RCE) Vulnerability CVSS 3.1CRITICAL 9.8
  • TI-2025-38177 LLaMA Factory's Chat API has Critical SSRF and LFI Vulnerabilities CVSS 3.1HIGH 8.1

Sources