Skip to main content

Tencent TFace CVE-2025-13711

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
    Deliver malicious model checkpoint file
  2. Exploit
    Victim loads file via torch.load in TFace
  3. Execution
    Pickle deserialization triggers payload
  4. Impact
    Execute arbitrary code 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 the victim to load an attacker-controlled model checkpoint through a TFace workflow that calls torch.load() without weights_only=True - the fixed code paths include quality/eval.py, quality/train.py, recognition and generation/uiface training and sample scripts, and the ONNX export converter. The concrete prerequisite is that the user supplies or is tricked into using a malicious .ckpt/.pt weights file as a checkpoint/resume/finetuning/eval-model argument. Limiting factors: this is LOCAL exploitation (AV:L) requiring user interaction (UI:R) to open/load the malicious file; there is no network-exposed 'eval' service in the patched code, so exploitation does not occur against a default running service but only when untrusted model files are processed. Risk is therefore confined to environments that ingest third-party or untrusted model artifacts.

Impact

This is a PyTorch pickle-style deserialization RCE (CWE-502) in Tencent TFace, a research-grade face-recognition toolkit. The signals are consistent but point to moderate real-world urgency rather than an emergency. The provided CVSS:3.0 vector is AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (7.8 High): exploitation is LOCAL and requires user interaction (the victim must load an attacker-supplied file), not a remote network-reachable endpoint - note the NVD/ZDI title says 'Remote Code Execution' and 'remote attackers,' which conflicts with the AV:L (local) metric; the realistic interpretation from the source evidence is that a user is tricked into loading a malicious model checkpoint, so treat 'remote' as supply/delivery of a file, not direct network access. EPSS is low (0.51%, 42nd percentile), there is no CISA KEV listing and no public exploit identified at time of analysis, so there is no evidence of active or widespread exploitation. The technical impact is severe (code execution as root per the description, full C/I/A loss), but the LOCAL + UI:R prerequisites and the niche, research-oriented deployment footprint meaningfully cap practical risk. Net: a genuine high-severity code-execution bug worth patching, but NOT a drop-everything priority absent exposure of the affected workflows to untrusted model files.

Exploit ScenarioDerived

An attacker publishes or sends a maliciously crafted PyTorch model checkpoint (e.g., a .ckpt/.pt weights file) and convinces a TFace user to load it through one of the training/eval/sample workflows. When the victim's process calls torch.load() on the untrusted file, the embedded pickle payload executes arbitrary code in the context of the running process - described as root. No public exploit code is identified at time of analysis, but the technique (pickle deserialization via torch.load without weights_only) is well understood and trivial to weaponize.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 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 PyTorch checkpoint files in Tencent TFace allows an attacker who convinces a user to load a malicious .ckpt/.pt weights file to execute arbitrary code, including as root, through torch.load() calls that omit weights_only=True. Tencent TFace is a research-grade face-recognition toolkit, and the vulnerable sinks span the quality evaluation and training scripts (quality/eval.py, quality/train.py), the recognition and generation/uiface training, sampling and ONNX-export code, and the attribute/M3DFEL solver. The weakness is CWE-502 and the assessed vector is CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (7.8): exploitation is local and requires user interaction - the victim must supply or be tricked into using an attacker-controlled checkpoint as a resume, finetuning or eval-model argument - so risk is concentrated in environments that ingest third-party or untrusted model artifacts rather than against a default running service. No public exploit code was identified and the CVE is not in CISA KEV; EPSS is 0.51% (42nd percentile), consistent with a low-volume, tooling-adjacent flaw.

RemediationAI

Apply the upstream fix by updating to Tencent TFace commit 7b2eed297d43dcdd1e3d45bfdfc950478e3af5d9 or later from https://github.com/Tencent/TFace/commit/7b2eed297d43dcdd1e3d45bfdfc950478e3af5d9, which is the vendor-available patch that adds weights_only=True to every torch.load call; a separately tagged release version is not independently confirmed, so pin deployments to that commit hash or verify each torch.load sink yourself. If immediate upgrade is impossible, audit and patch the sinks locally (quality/eval.py, quality/train.py, quality/generate_pseudo_labels/extract_embedding/extract_feats.py, recognition/deploy/converter/export_onnx.py, the duetface/partialface task modules, attribute/M3DFEL/solver.py and generation/uiface code) to pass weights_only=True; be aware this can break checkpoints that legitimately embed non-tensor Python objects such as custom optimizer or config classes, so re-save such artifacts as plain state_dicts or load them in an isolated step. Operationally, only load .ckpt/.pt files from trusted, integrity-verified sources (checksum or signature validation) and never process third-party pretrained checkpoints from untrusted origins, as that trust boundary is the actual exploitation precondition. Run evaluation, training and ONNX export in a least-privilege container or unprivileged account with no host mounts and restricted network egress, since the vulnerability yields code execution at the invoking user's privilege level (frequently root in GPU training images); the trade-off is reduced convenience for interactive experiments. Reference the advisory at https://www.zerodayinitiative.com/advisories/ZDI-25-1035/ for reporter and disclosure details.

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 Python pickle deserialization (CWE-502) surfaced through PyTorch's model-loading API. torch.load() historically unpickles checkpoint payloads with the default unpickler, so a crafted object can define __reduce__ and execute arbitrary Python during load, before any model validation occurs. Tencent's fix (commit 7b2eed297d43dcdd1e3d45bfdfc950478e3af5d9) hardens every identified sink by adding weights_only=True to torch.load, restricting the unpickler to tensor and primitive types. The patch touches attribute/M3DFEL/solver.py, generation/uiface/main.py, generation/uiface/models/autoencoder/vqgan.py, generation/uiface/sample.py, quality/eval.py, quality/generate_pseudo_labels/extract_embedding/extract_feats.py, quality/train.py, recognition/deploy/converter/export_onnx.py, and recognition/tasks/duetface and partialface base_task/train modules. Note that the ZDI advisory's 'eval endpoint' refers to the quality/eval.py script rather than a network-exposed service: the code paths only deserialize a file path supplied as an argument, which is why the assessed vector is AV:L with UI:R and PR:N rather than a remotely reachable unauthenticated service. Code execution occurs with the privileges of the invoking user, which in typical GPU training and evaluation deployments is frequently root inside a container or workstation.

Know when Tface gets its next vulnerability

  • 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 because exploitation requires loading a malicious checkpoint file (AV:L) with no privileges but mandatory user interaction (UI:R); pickle deserialization yields full code execution, so C/I/A all High.

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 TFace eval Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Tencent TFace. 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 eval 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-27187.

Executive ViewAI

Why It Matters

Tencent TFace, a research-grade face-recognition toolkit, carries a high-severity unsafe deserialization flaw (CVE-2025-13711) in which a malicious .ckpt/.pt checkpoint loaded through torch.load() can execute arbitrary code, including as root, on the machine performing the load. Exposure is concentrated in teams that ingest third-party or shared model weights for evaluation, fine-tuning, or resume workflows, so a single crafted artifact could compromise research workstations and the credentials and data they hold. There is no public exploit identified at time of analysis, and a vendor patch is available.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 58% exploitable
Prevalence
Low
research-oriented Tencent face-recognition toolkit, limited production/enterprise 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 Yes
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.

Affected Products (CPE)CVE.org

cpe:2.3:a:tencent:tface:*:*:*:*:*:*:*:*

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