Skip to main content

Tencent HunyuanDiT CVE-2025-13707

HIGH
Deserialization of Untrusted Data (CWE-502)
2025-12-23 zdi-disclosures@trendmicro.com
7.8
CVSS 3.0 · Vendor: trendmicro
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Host malicious model checkpoint
  2. Delivery
    Lure victim to load/resume file
  3. Exploit
    Trigger unsafe deserialization in model_resume
  4. Execution
    Execute arbitrary code as root
  5. Impact
    Full host compromise

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V1 - Encoding and Sanitization Safe deserialization, type allowlists
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim to load or resume from an attacker-supplied model artifact via the model_resume function - i.e., the user must open a malicious file or visit a malicious page that triggers such a load (UI:R). The precondition is that HunyuanDiT performs unsafe deserialization (pickle/torch.load without weights_only) on user-supplied checkpoint data; this is the default behavior on the vulnerable PyTorch dependency (torch<2.7.1 as pinned pre-patch). LIMITING FACTORS: the attack vector is local (AV:L), so there is no direct network-service exposure; successful exploitation depends entirely on social engineering the user into loading an untrusted model, and it is mitigated by upgrading to torch>=2.7.1 (where weights_only=True is the safe default) or by refusing to load untrusted checkpoints.

Impact

This is a genuine code-execution flaw but not a drop-everything emergency for most environments. The CVSS 3.0 base score of 7.8 (High) is driven by a LOCAL attack vector (AV:L) with low complexity (AC:L) and no privileges required (PR:N), but it is gated by required user interaction (UI:R) - the victim must open or load a malicious model/file. Crucially, despite the title and ZDI advisory saying 'Remote attackers,' the CVSS vector is AV:L, so this is not a network-reachable, unauthenticated remote service exploit; it is a file/model-delivery exploit where the 'remote' aspect is social delivery of a poisoned artifact. EPSS is low at 0.51% (42nd percentile), and the vulnerability is NOT in CISA KEV, with no public exploit code identified in the provided data - so there is no evidence of active or widespread exploitation, consistent with a research-grade ML project rather than a mass-targeted enterprise service. The strongest corroborating signal is the vendor patch commit, which bumps the PyTorch dependency to torch>=2.7.1 (a version whose torch.load defaults to safe weights_only loading), strongly indicating the root cause is unsafe pickle/torch.load deserialization of an attacker-supplied checkpoint in model_resume. CONFLICT TO VERIFY: the description calls this a 'Remote Code Execution' affecting 'remote attackers,' yet CVSS is AV:L and requires UI - treat this as local/social-delivery RCE, not network RCE, when prioritizing.

Exploit ScenarioDerived

An attacker crafts a malicious HunyuanDiT model checkpoint (a weaponized pickle/torch.load payload) and distributes it via a model-sharing site, link, or file, convincing a user to resume training or inference from it. When the victim loads it through the model_resume function, the untrusted data is deserialized and arbitrary code executes in the context of root. No public exploit code is identified at time of analysis, but the deserialization pattern (CWE-502) and the dependency bump to torch>=2.7.1 in the fix make exploitation straightforward to reproduce.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 19, 2026

Deserialization of untrusted data in Tencent HunyuanDiT's model_resume function allows attackers to execute arbitrary code in the context of the process-potentially root-when a user loads a malicious model checkpoint, requiring user interaction (CVSS 7.8). The flaw stems from unsafe torch.load/pickle handling under the pre-patch pinned PyTorch 2.0.0 dependency; exploitation is local (AV:L) and depends on social engineering the victim into resuming an attacker-supplied model. No public exploit code or CISA KEV entry was identified at time of analysis (EPSS ~0.51%), and an upstream fix commit raises the PyTorch requirement to >=2.7.1.

RemediationAI

Apply the upstream fix commit d2cb9cde5c9dc6a6c01735dcb92fe7699ddf6bc5, which raises the PyTorch requirement to torch>=2.7.1 and torchvision>=0.21.0; this is an upstream fix available via commit/PR, and a released patched version is not independently confirmed from the provided data. After upgrading, ensure model_resume no longer loads untrusted checkpoints with unsafe pickle deserialization. If upgrading is not immediately possible, do not resume or load model artifacts from untrusted sources, restrict model_resume inputs to trusted, integrity-checked checkpoints, run HunyuanDiT with least privilege rather than as root, and isolate the process in a sandbox or container with limited filesystem and network access. Where application code controls the load call, pass weights_only=True to torch.load, recognizing that older pinned PyTorch releases may still have compatibility limitations with certain checkpoint formats. Refer to the ZDI advisory at https://www.zerodayinitiative.com/advisories/ZDI-25-1029/ and the GitHub commit for vendor guidance.

Affected ProductsAI

Tencent HunyuanDiT installations are affected, specifically deployments using the vulnerable model_resume path in app/hydit_app.py and the pinned dependency set torch2.0.0 with torchvision0.14.1 from requirements.txt. The issue is triggered when a user resumes from an attacker-supplied model checkpoint. No CPE strings were provided in the input data to further constrain platform or version ranges. Vendor references include the upstream fix commit at https://github.com/Tencent-Hunyuan/HunyuanDiT/commit/d2cb9cde5c9dc6a6c01735dcb92fe7699ddf6bc5 and the ZDI advisory at https://www.zerodayinitiative.com/advisories/ZDI-25-1029/.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability is a CWE-502 deserialization-of-untrusted-data flaw in the model_resume function of Tencent HunyuanDiT's application code (app/hydit_app.py). HunyuanDiT relies on PyTorch checkpoint loading, and pre-patch requirements pinned torch2.0.0 and torchvision0.14.1, where torch.load defaults to pickle-based deserialization rather than weights_only=True. When a crafted checkpoint is resumed, pickle opcodes can invoke arbitrary callables, giving code execution with the privileges of the HunyuanDiT process (described as root in the ZDI advisory). The assessed CVSS vector is CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H: the attack is local, requires the victim to open or load a malicious model artifact (UI:R), and needs no prior authentication (PR:N). The upstream fix commit d2cb9cde5c9dc6a6c01735dcb92fe7699ddf6bc5 updates requirements to torch>=2.7.1 and torchvision>=0.21.0, where safe weights_only loading is the default, and also creates expected model subdirectories in the app.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (trendmicro) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

Exploitation needs no privileges but requires the user to load a malicious model file (AV:L, UI:R); unsafe deserialization yields full code execution as root, so C:H/I:H/A:H.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (trendmicro).

CVSS VectorVendor: trendmicro

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Tencent HunyuanDiT model_resume Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Tencent HunyuanDiT. 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 model_resume function. 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 root. Was ZDI-CAN-27183.

Executive ViewAI

Why It Matters

Tencent HunyuanDiT carries a high-severity unsafe deserialization flaw in its model_resume function that can lead to arbitrary code execution with the privileges of the running process when a user loads a tampered model checkpoint. The risk is concentrated among research and ML engineering staff who download and resume third-party or community model files, and exploitation requires social engineering rather than remote access, so leadership should treat this primarily as a supply-chain and insider-workflow risk affecting AI development environments rather than an internet-facing exposure.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 58% exploitable
Prevalence
Low
niche Tencent open-source text-to-image research model, limited production footprint
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.5%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
Medium

Priority Score

40
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy