PT-2025-18684 · Torch+1 · Torch+1
CVSS v3.1
7.8
High
| Vector | AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
LLaMA-Factory version prior to 1.0.0
Description
LLaMA Factory enables fine-tuning of large language models. A critical issue exists in the
llamafy baichuan2.py script, which 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.Recommendations
For versions prior to 1.0.0, update to version 1.0.0 to resolve the issue. As a temporary workaround, consider disabling the
llamafy baichuan2.py script or restricting access to the input directory to minimize the risk of exploitation. Avoid using the torch.load() function on untrusted .bin files until the issue is resolved.Exploit
Fix
Deserialization of Untrusted Data
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Llama Factory
Torch