CVE-2025-61784
LLaMA Factory's Chat API has Critical SSRF and LFI Vulnerabilities
Also known as GHSA-527m-2xhr-j27g, PYSEC-2026-1573
Mitigation
- Upgrade llamafactory to 0.9.4 or later.
Who should check
- Projects that depend on PyPI package llamafactory (< 0.9.4)
- Anyone running hiyouga LLaMA-Factory < 0.9.4
Vulnerability facts
- Affected
- llamafactory < 0.9.4
- Fixed in
- 0.9.4
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 7.6 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: Low
- Availability impact: Low
- EPSS
- 0.55% chance of exploitation in 30 days (percentile 39, 2026-11-26)
- CWE
- CWE-22, CWE-918
- Modified
Description
LLaMA-Factory is a tuning library for large language models. Prior to version 0.9.4, 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. The vulnerability exists in the `_process_request` 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 sanitization of the URL. Version 0.9.4 fixes the underlying issue.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| PyPI llamafactory | < 0.9.4 | 0.9.4 | osv |
| hiyouga LLaMA-Factory | < 0.9.4 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-61784. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-61784.md Affected: llamafactory < 0.9.4 Fixed in: 0.9.4 Steps: 1. Search this machine and project for llamafactory (PyPI), hiyouga LLaMA-Factory: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
FAQ
Is CVE-2025-61784 being exploited?
There is no confirmed exploitation: CVE-2025-61784 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.55% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-61784?
High: CVSS 7.6 (v3.1, scored by CNA). Remote, login needed.
Which versions are affected by CVE-2025-61784?
llamafactory < 0.9.4.
Is there a fix for CVE-2025-61784?
Yes. Fixed in 0.9.4. Upgrade llamafactory to 0.9.4 or later.
How do I check if I'm affected by CVE-2025-61784?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.