Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
7.6
CVE-2025-61784: LLaMA Factory chat API can expose files and internal services
CVE-2025-61784 · published 1 year ago
Summary
The chat feature in LLaMA Factory versions before 0.9.4 lets a logged‑in user make the server request any web address or read any file on the server. This could reveal confidential data or give a view of your internal network. Update to version 0.9.4 or later to stop the issue.
What to do
- Update hiyouga llama-factory to version 0.9.4 or later.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| pip | hiyouga | llamafactory | <= 0.9.3 |
| – | hiyouga | llama-factory |
< 0.9.4 cpe:2.3:a:hiyouga:llama-factory:*:*:*:*:*:*:*:* |
Original advisory text
LLaMA Factory's Chat API has Critical SSRF and LFI Vulnerabilities
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.
References
- https://github.com/advisories/GHSA-527m-2xhr-j27g
- https://github.com/hiyouga/LlamaFactory/security/advisories/GHSA-527m-2xhr-j27g
- https://github.com/hiyouga/LLaMAFactory/commit/95b7188090a1018935c9dc072bfc97f24...
- https://nvd.nist.gov/vuln/detail/CVE-2025-61784 Vendor Advisory
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/61xxx/CVE-2025-61784... Vendor Advisory
- https://github.com/hiyouga/LLaMA-Factory/commit/95b7188090a1018935c9dc072bfc97f2... Patch
- https://github.com/hiyouga/LLaMA-Factory/security/advisories/GHSA-527m-2xhr-j27g Vendor Advisory
Internet-facing
60 days
Internal
At next upgrade
- Not known to be exploited
- Needs hands-on effort to exploit
- Gives an attacker partial control
Type
CWE-22Path Traversal
CWE-918Server-Side Request Forgery (SSRF)
Timeline
Published7 Oct 2025
Updated4 Nov 2026
First seen6 Mar 2026
Track software like this
Free during beta