# CVE-2025-61784: LLaMA Factory's Chat API has Critical SSRF and LFI Vulnerabilities

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.6
- **CVSS:** 7.6 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.55% (percentile 39, 2026-11-26)
- **CWE:** CWE-22, CWE-918
- **Aliases:** GHSA-527m-2xhr-j27g, PYSEC-2026-1573
- **Published:** 2025-10-07T19:01:40.400Z
- **Modified:** 2026-10-08T13:10:00.200Z

## Who should check

- Projects that depend on PyPI package llamafactory (\< 0.9.4)
- Anyone running hiyouga LLaMA-Factory \< 0.9.4

## 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

- PyPI `llamafactory`: affected \< 0.9.4; fixed 0.9.4 (osv)
- hiyouga LLaMA-Factory: \< 0.9.4 (cvelist)

## Mitigation

- Upgrade llamafactory to 0.9.4 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://github.com/hiyouga/LLaMA-Factory/security/advisories/GHSA-527m-2xhr-j27g>
- vendor: <https://github.com/hiyouga/LlamaFactory/security/advisories/GHSA-527m-2xhr-j27g>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2025-61784>
- vendor: <https://github.com/advisories/GHSA-527m-2xhr-j27g>
- patch: <https://github.com/hiyouga/LLaMA-Factory/commit/95b7188090a1018935c9dc072bfc97f24f1c96e9>
- patch: <https://github.com/hiyouga/LLaMAFactory/commit/95b7188090a1018935c9dc072bfc97f24f1c96e9>
- other: <https://github.com/hiyouga/LLaMA-Factory>
- other: <https://pypi.org/project/llamafactory>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-61784>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-527m-2xhr-j27g> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-1573> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2025-61784> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-61784>
