Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. llamafactory
  4. ›
  5. GHSA-f2f7-gj54-6vpv

GHSA-f2f7-gj54-6vpv: LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py

April 23, 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

Code Behaviors & Features

Detect and mitigate GHSA-f2f7-gj54-6vpv with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 0.9.2

Solution

Unfortunately, there is no solution available yet.

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/GHSA-f2f7-gj54-6vpv.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Wed, 14 May 2025 12:15:08 +0000.