CVE-2025-61784 Details
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.
A Server-Side Request Forgery (SSRF) vulnerability has been identified in the chat API of LLaMA-Factory, a tuning library for large language models. This vulnerability, present in versions through 0.9.3, allows authenticated users to manipulate the server into making arbitrary HTTP requests to both internal and external networks. Such actions could expose sensitive internal services, facilitate reconnaissance of the internal network, or interact with third-party services. Additionally, this vulnerability introduces a Local File Inclusion (LFI) risk, enabling users to read arbitrary files from the server's filesystem. The issue resides in the '_process_request' function of 'src/llamafactory/api/chat.py', which processes incoming multimodal content, including images, videos, and audio via URLs. The function inadequately validates or sanitizes URLs before making HTTP GET requests, leaving room for exploitation.
Users can update to LLaMA-Factory version 0.9.4 or later, where this vulnerability has been patched.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Oct 7, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/hiyouga/LLaMA-Factory/security/advisories/GHSA-527m-2xhr-j27g | CISA-ADP | ExploitThird Party Advisory |
| https://github.com/hiyouga/LLaMA-Factory/commit/95b7188090a1018935c9dc072bfc97f24f1c96e9 | [email protected] | Patch |
| https://github.com/hiyouga/LLaMA-Factory/security/advisories/GHSA-527m-2xhr-j27g | [email protected] | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-918 | Server-Side Request Forgery (SSRF) | [email protected] |
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
| CWE-918 | Server-Side Request Forgery (SSRF) | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| hiyouga llama-factory | < 0.9.4 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 8, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Oct 22, 2025 | Initial Analysis | [email protected] |
| Oct 7, 2025 | CVE Modified | CISA-ADP |
| Oct 7, 2025 | New CVE Received | [email protected] |