Skip to main content

Tencent HunyuanDiT CVE-2025-13712

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
    Craft malicious serialized merge artifact
  2. Delivery
    Deliver via malicious page or file
  3. Exploit
    Victim loads artifact into merge endpoint
  4. Execution
    Untrusted data deserialized without validation
  5. Impact
    Arbitrary code executed as root

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 a user running Tencent HunyuanDiT to load or process an attacker-supplied artifact through the merge endpoint - the condition is that untrusted, attacker-controlled serialized data reaches that endpoint, where it is deserialized without proper validation (CWE-502). Limiting factors that reduce real-world risk: (1) the attack vector is local (AV:L), not network-reachable, so the attacker must get their malicious file/page in front of the victim; (2) user interaction is mandatory (UI:R) - the victim must actively visit a malicious page or open a malicious file; (3) exploitation targets an environment that already has HunyuanDiT installed and is willing to ingest external model/merge files. There is no authentication barrier (PR:N), and successful exploitation runs with root privileges, so environments that routinely load third-party model artifacts are most exposed.

Impact

This is a genuine but conditionally-exploitable code-execution flaw rather than a drop-everything emergency. The provided CVSS 3.0 vector (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, base 7.8 HIGH) is internally consistent with the description: exploitation is local (AV:L) and requires user interaction (UI:R) - the victim must visit a malicious page or open a malicious file - but needs no prior authentication (PR:N) and yields full confidentiality, integrity, and availability impact because code runs in the context of root. The signals mostly align and point AWAY from mass exploitation: EPSS is only 0.51% (42nd percentile), the CVE is NOT in CISA KEV, and no public exploit was supplied in the input. The deserialization pattern (CWE-502) is a historically reliable RCE class, so weaponization is plausible if a researcher publishes a gadget chain, but as of this analysis no public exploit is identified. The key tension to flag: the AV:L + UI:R combination means this is NOT remotely wormable - it depends on luring a user who runs the HunyuanDiT app into processing an attacker-controlled model/merge artifact, which caps real-world blast radius. Net priority: moderate - patch promptly in any environment running HunyuanDiT that ingests untrusted model files, but this does not carry the urgency of a network-facing, no-interaction RCE.

Exploit ScenarioDerived

An attacker crafts a malicious serialized model/merge artifact and distributes it (e.g., on a model-sharing site or via a malicious page/file) to a user running Tencent HunyuanDiT. When the victim loads or merges that artifact through the vulnerable merge endpoint, the untrusted data is deserialized and attacker-controlled code executes as root. No public exploit was provided in the input, but the CWE-502 deserialization pattern and local attack vector (AV:L/UI:R) make a working gadget chain realistic for a motivated researcher.

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 the merge endpoint of Tencent HunyuanDiT lets an attacker who convinces a user to open a malicious model file or visit a crafted page execute arbitrary code with root privileges on the affected installation. The flaw is reachable only through a local attack vector and requires the victim to actively interact with the attacker-supplied artifact, but no authentication is needed and successful exploitation yields full confidentiality, integrity, and availability impact. No public exploit code has been identified at time of analysis and CISA KEV does not list the issue; EPSS sits at 0.51% (42nd percentile), indicating low predicted exploitation activity, so risk is concentrated in environments that routinely ingest third-party model, LoRA, or ControlNet checkpoints.

RemediationAI

Apply the upstream fix commit d2cb9cde5c9dc6a6c01735dcb92fe7699ddf6bc5 (see https://github.com/Tencent-Hunyuan/HunyuanDiT/commit/d2cb9cde5c9dc6a6c01735dcb92fe7699ddf6bc5), which raises the dependency floor to torch>=2.7.1 and torchvision>=0.21.0 so that torch.load defaults to weights_only=True; note that this is an upstream commit-based fix and a tagged patched release was not independently confirmed, so verify the pins in your own requirements.txt. Expect possible breakage from the torch/torchvision upgrade against pinned libraries such as timm==0.9.5 and older diffusers builds, and expect legacy checkpoints to fail loading unless weights_only=False is explicitly set - treat any such override as a security decision, not a convenience one. Until the upgrade is deployed, disable or network-firewall the merge endpoint so only trusted operators can reach it, refuse to load .pt/.ckpt/.bin model, LoRA, and ControlNet artifacts from untrusted or downloaded sources, and run HunyuanDiT as a dedicated unprivileged user inside a container so that the AV:L/PR:N payload cannot obtain root; the trade-offs are reduced model-sharing flexibility and, for the non-root/container step, extra setup plus potential GPU device passthrough configuration work. Monitor the ZDI advisory at https://www.zerodayinitiative.com/advisories/ZDI-25-1028/ for any updated remediation guidance.

Affected ProductsAI

Tencent HunyuanDiT installations built from source prior to commit d2cb9cde5c9dc6a6c01735dcb92fe7699ddf6bc5 are affected, specifically anything still pinned to torch2.0.0 and torchvision0.14.1 as shipped in the project's requirements.txt and README install instructions; the vulnerable component is the merge endpoint in app/hydit_app.py. No CPE identifiers were supplied by NVD for this CVE. The vendor fix is documented in the GitHub commit https://github.com/Tencent-Hunyuan/HunyuanDiT/commit/d2cb9cde5c9dc6a6c01735dcb92fe7699ddf6bc5 and the disclosure details are in the ZDI advisory https://www.zerodayinitiative.com/advisories/ZDI-25-1028/ (ZDI-CAN-27190). Because no versioned release was named in the available data, version ranges cannot be stated more precisely than "builds preceding the fix commit".

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 root cause is CWE-502, deserialization of untrusted data, in the merge endpoint of the HunyuanDiT application code (app/hydit_app.py), which loads user-supplied model artifacts without validating their contents. In Python ML tooling this class of bug typically surfaces through pickle-based loaders such as torch.load, where a crafted checkpoint can embed a __reduce__ payload that executes on load. The upstream fix commit d2cb9cde5c9dc6a6c01735dcb92fe7699ddf6bc5 addresses it by moving the dependency pins from torch2.0.0/torchvision0.14.1 to torch>=2.7.1 and torchvision>=0.21.0, i.e. adopting PyTorch releases where torch.load defaults to weights_only=True and unsafe deserialization must be explicitly opted into; the same commit also pre-creates the controlnet, t2i/model, and t2i/lora directories under the model root, indicating the merge workflow operates on externally supplied checkpoint files. The assessed vector (AV:L/AC:L/PR:N/UI:R) confirms the attacker must land a file or page on the victim's machine rather than reach the endpoint over the network, and impact is scoped to the privileges of the HunyuanDiT process, which the description indicates run as root.

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

Local artifact-driven deserialization (AV:L) needing no auth (PR:N) but victim interaction (UI:R); reliable CWE-502 trigger (AC:L) yields full root-context impact (C/I/A:H, scope unchanged).

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:A/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 merge 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 merge endpoint. 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-27190.

Executive ViewAI

Why It Matters

Tencent HunyuanDiT carries a high-severity code-execution risk when users load malicious model artifacts, with successful exploitation granting root-level control of the affected installation. The exposure is concentrated in teams that routinely ingest third-party model, LoRA, or ControlNet checkpoints, and because no vendor-released patch has been identified, leadership should treat it as an operational and governance risk rather than a broadly exploitable internet threat. No public exploit has been identified at time of analysis, and the issue is not listed in CISA KEV.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis; restrict ingestion to approved model, LoRA, and ControlNet checkpoints, disable or restrict the merge endpoint, run with least privilege rather than root, isolate deployments, scan and signature-verify artifacts, and monitor for malicious files or anomalous activity.

Threat Intelligence Overview

EPSS Score
0.5%
Top 58% exploitable
Prevalence
Low
niche open-source AI 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
High

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