Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. llamafactory
  4. ›
  5. CVE-2025-46567

CVE-2025-46567: LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py

April 23, 2025 (updated June 28, 2025)

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.

References

  • github.com/advisories/GHSA-f2f7-gj54-6vpv
  • github.com/hiyouga/LLaMA-Factory
  • github.com/hiyouga/LLaMA-Factory/blob/main/scripts/convert_ckpt/llamafy_baichuan2.py
  • github.com/hiyouga/LLaMA-Factory/commit/2989d39239d2f46e584c1e1180ba46b9768afb2a
  • github.com/hiyouga/LLaMA-Factory/security/advisories/GHSA-f2f7-gj54-6vpv
  • nvd.nist.gov/vuln/detail/CVE-2025-46567

Code Behaviors & Features

Detect and mitigate CVE-2025-46567 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 0.9.3

Fixed versions

  • 0.9.3

Solution

Upgrade to version 0.9.3 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-502: Deserialization of Untrusted Data

Source file

pypi/llamafactory/CVE-2025-46567.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:22 +0000.