Description
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.
Published: 2025-05-01
Score: 6.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

No vendor fix or workaround currently provided.

Additional remediation guidance may be available on OpenCVE Cloud.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
EUVD EUVD EUVD-2025-12156 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.
Github GHSA Github GHSA GHSA-f2f7-gj54-6vpv LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py
History

Tue, 17 Jun 2025 14:45:00 +0000

Type Values Removed Values Added
First Time appeared Hiyouga
Hiyouga llama-factory
CPEs cpe:2.3:a:hiyouga:llama-factory:*:*:*:*:*:*:*:*
Vendors & Products Hiyouga
Hiyouga llama-factory

Fri, 02 May 2025 18:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 01 May 2025 17:30:00 +0000

Type Values Removed Values Added
Description 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.
Title LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py
Weaknesses CWE-502
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:L'}


Subscriptions

Hiyouga Llama-factory
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2025-05-02T17:29:45.664Z

Reserved: 2025-04-24T21:10:48.175Z

Link: CVE-2025-46567

cve-icon Vulnrichment

Updated: 2025-05-02T17:29:37.760Z

cve-icon NVD

Status : Analyzed

Published: 2025-05-01T18:15:58.117

Modified: 2025-06-17T14:19:39.290

Link: CVE-2025-46567

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses