Skip to content

← Public intelligence

PyPI package

llamafactory

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

3 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 7.6PyPIAmendedPublished

    LLaMA Factory's Chat API Contains Critical SSRF and LFI Vulnerabilities

    CVE-2025-61784 · GHSA-527m-2xhr-j27g

    Affected
    • PyPI llamafactory <= 0.9.3
    Fixed in
    0.9.4· Vendor fix available
    Issue
    A Server-Side Request Forgery (SSRF) vulnerability in the chat API allows any authenticated user to force the server to make arbitrary HTTP requests to internal and external networks. This can lead to the exposure of sensitive internal services, reconnaissance of the internal network, or interaction with third-party services. The same mechanism also allows for a Local File Inclusion (LFI) vulnerability, enabling users to read arbitrary files from the server's filesystem. Details The vulnerability exists in the processrequest function within src/llamafactory/api/chat.py. This function is responsible for processing incoming multimodal content, including images, videos, and audio provided via URLs. The function checks if the provided URL is a base64 data URI or a local file path (os.path.isfile). If neither is true, it falls back to treating the URL as a web URI and makes a direct HTTP GET request using requests.get(url, stream=True).raw without any validation or…

    Recommended action: Upgrade to 0.9.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. Medium, CVSS 6.1PyPIAmendedPublished

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

    CVE-2025-46567 · GHSA-f2f7-gj54-6vpv

    Affected
    • PyPI llamafactory <= 0.9.2
    Fixed in
    0.9.3· Vendor fix available
    Issue
    A critical vulnerability exists in the llamafybaichuan2.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. Attack Vector This vulnerability is exploitable without authentication or privileges when a user is tricked into: 1. Downloading or cloning a malicious project folder containing a crafted .bin file (e.g. via zip file, GitHub repo). 2. Running the provided conversion script llamafybaichuan2.py, either manually or as part of an example workflow. No elevated privileges are required. The user only needs to run the script with an attacker-supplied --inputdir. Impact - Arbitrary command execution (RCE) - System compromise - Persistence or lateral movement in shared compute environments Proof of Concept (PoC) An example of config.json: ➡️…

    Recommended action: Upgrade to 0.9.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. High, CVSS 7.5PyPIAmendedPublished

    LLama Factory Remote OS Command Injection Vulnerability

    CVE-2024-52803 · GHSA-hj3w-wrh4-44vp

    Affected
    • PyPI llamafactory <= 0.9.0
    Fixed in
    0.9.1· Vendor fix available
    Issue
    A critical remote OS command injection vulnerability has been identified in the Llama Factory training process. This vulnerability arises from improper handling of user input, allowing malicious actors to execute arbitrary OS commands on the host system. The issue is caused by insecure usage of the Popen function with shell=True, coupled with unsanitized user input. Immediate remediation is required to mitigate the risk. Affected Version Llama Factory versions <=0.9.0 are affected by this vulnerability. Impact Exploitation of this vulnerability allows attackers to: 1. Execute arbitrary OS commands on the server. 2. Potentially compromise sensitive data or escalate privileges. 3. Deploy malware or create persistent backdoors in the system. This significantly increases the risk of data breaches and operational disruption. Root Cause The vulnerability originates from the training process where the outputdir value, obtained from the user input, is injected into the popen function…

    Recommended action: Upgrade to 0.9.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →