# CVE-2025-53002: LLaMA-Factory Remote Code Execution (RCE) Vulnerability

- Severity: High 8.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.36%, higher than 72% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2025-06-26T14:40:52.764Z
- Modified: 2026-07-07T17:57:19.707Z
- Also known as: GHSA-xj56-p8mm-qmxj, PYSEC-2026-1576
- Weaknesses: CWE-94, CWE-502
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

LLaMA-Factory is a tuning library for large language models. A remote code execution vulnerability was discovered in LLaMA-Factory versions up to and including 0.9.3 during the LLaMA-Factory training process. This vulnerability arises because the `vhead_file` is loaded without proper safeguards, allowing malicious attackers to execute arbitrary malicious code on the host system simply by passing a malicious `Checkpoint path` parameter through the `WebUI` interface. The attack is stealthy, as the victim remains unaware of the exploitation. The root cause is that the `vhead_file` argument is loaded without the secure parameter `weights_only=True`. Version 0.9.4 contains a fix for the issue.

(As written by CVE List.)

## Affected

- hiyouga LLaMA-Factory: < 0.9.4; before 0.9.4
- llamafactory (PyPI): up to 0.9.3

## Every score

- GitHub_M: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H`
- GitHub: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H`

## References

- <https://github.com/hiyouga/LLaMA-Factory/security/advisories/GHSA-xj56-p8mm-qmxj> (exploit, third-party-advisory, web)
- <https://drive.google.com/file/d/1AddKm2mllsXfuvL4Tvbn_WJdjEOYXx4y/view?usp=sharing> (exploit)
- <https://github.com/hiyouga/LLaMA-Factory/commit/bb7bf51554d4ba8432333c35a5e3b52705955ede> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-53002> (advisory)
- <https://github.com/hiyouga/LLaMA-Factory> (package)
- <https://pypi.org/project/llamafactory> (package)
- <https://github.com/advisories/GHSA-xj56-p8mm-qmxj> (advisory)

## Sources

- CVE List: [CVE-2025-53002](https://www.cve.org/CVERecord?id=CVE-2025-53002), CVE Terms of Use, modified 2025-06-26
- GitHub Advisory Database: [GHSA-xj56-p8mm-qmxj](https://github.com/advisories/GHSA-xj56-p8mm-qmxj), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2025-53002](https://nvd.nist.gov/vuln/detail/CVE-2025-53002), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1576](https://osv.dev/vulnerability/PYSEC-2026-1576), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2025-53002 · Whole record: https://cve.day/CVE-2025-53002.json · Rebuilt by cve.day 2026-11-25T22:58:59.653Z
