LLaMA-Factory Remote Code Execution (RCE) Vulnerability
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2025-53002
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 18:24 UTC · Revision 1
Source evidence
LLaMA-Factory Remote Code Execution (RCE) Vulnerability
core-osv · Original sourcePublished 26 Jun 2025, 14:40 UTC
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.
osv:CVE-2025-53002
Complete source record
{
"id": "85345b42624de6a6af598ae440efea3bfeeccc53e65719bcebb74cb9a1770796",
"url": "https://osv.dev/vulnerability/CVE-2025-53002",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "LLaMA-Factory Remote Code Execution (RCE) Vulnerability",
"summary": "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.",
"evidence": "osv:CVE-2025-53002",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2025-53002",
"aliases": [
"CVE-2025-53002",
"GHSA-xj56-p8mm-qmxj",
"PYSEC-2026-1576"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/hiyouga/LlamaFactory",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "95ac3f2373b82662c1bd855c284d3379e6a763d3"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "0.9.4"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "bb7bf51554d4ba8432333c35a5e3b52705955ede"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v0.9.3",
"v0.9.2",
"v0.9.1",
"v0.9.0",
"v0.8.3",
"v0.8.2",
"v0.8.1",
"v0.8.0",
"v0.7.1",
"v0.7.0",
"v0.6.3",
"v0.6.2",
"v0.6.1",
"v0.6.0",
"v0.5.3",
"v0.5.2",
"v0.5.0",
"v0.4.0",
"v0.3.3",
"v0.3.2",
"v0.3.0",
"v0.2.2",
"v0.2.1",
"v0.2.0",
"v0.1.8",
"v0.1.7",
"v0.1.6",
"v0.1.5",
"v0.1.4",
"v0.1.3",
"v0.1.2",
"v0.1.1",
"v0.1.0",
"v0.0.9"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-53002.json"
}
}
],
"modified": "2026-10-28T02:30:38.184575462Z",
"provider": "osv",
"references": [
"https://drive.google.com/file/d/1AddKm2mllsXfuvL4Tvbn_WJdjEOYXx4y/view?usp=sharing",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/53xxx/CVE-2025-53002.json",
"https://github.com/hiyouga/LLaMA-Factory/security/advisories/GHSA-xj56-p8mm-qmxj",
"https://nvd.nist.gov/vuln/detail/CVE-2025-53002",
"https://github.com/hiyouga/LLaMA-Factory/commit/bb7bf51554d4ba8432333c35a5e3b52705955ede"
],
"provider_metadata": {
"cwe_ids": [
"CWE-502",
"CWE-94"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/53xxx/CVE-2025-53002.json"
}
},
"related_cves": [
{
"value": "CVE-2025-53002",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 505669,
"published_at": "2025-06-26T14:40:52.764+00:00"
}