Tencent TFace CVE-2025-13709
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious PyTorch checkpoint
-
ExploitLure user to load the file
-
Executiontorch.load pickle deserialization triggers
-
ImpactExecute 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 the vulnerable restore_checkpoint path, where torch.load() is invoked without weights_only=True (confirmed by the fix diff across solver.py, main.py, vqgan.py, sample.py, eval.py and related training/eval scripts). The concrete prerequisite is that the user opens or resumes from a malicious .ckpt/.pth file (e.g. an untrusted 'pretrained' model or one passed via a --resume/checkpoint path). This works against default configurations because historic torch.load defaulted to weights_only=False. Limiting factors: it is NOT remotely exploitable over a network service - it needs local delivery of a file plus explicit user interaction (UI:R) to load it, which constrains realistic exploitation to supply-chain / social-engineering scenarios against TFace operators. |
| Impact | This is a classic PyTorch pickle-deserialization (CWE-502) remote code execution flaw: the fix diff confirms the root cause is |
| Exploit ScenarioDerived | An attacker publishes or sends a weaponized model checkpoint (e.g. a .ckpt/.pth file) and convinces a TFace user - a researcher or ML engineer - to load it, for example via a training/eval/resume workflow or by downloading a 'pretrained' model from an untrusted repository. When restore_checkpoint calls torch.load() without weights_only=True, the embedded pickle payload executes and runs arbitrary code as root. No public exploit is identified at time of analysis, but the technique (malicious PyTorch pickle) is well-known and trivially reproducible. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
PyTorch checkpoint loading in Tencent TFace (restore_checkpoint and related model-loading paths) deserializes untrusted data, letting an attacker who supplies a malicious .ckpt/.pth file execute arbitrary code in the context of the user running TFace - typically root in the reference ZDI finding. The flaw is local and requires user interaction (CVSS 7.8, AV:L/AC:L/PR:N/UI:R): the victim must explicitly point the toolkit at an attacker-controlled checkpoint, for example via a --resume path or a downloaded 'pretrained' model, so realistic abuse is a supply-chain or social-engineering play against TFace operators rather than remote exploitation of a network service. The upstream project has published a fix commit that adds weights_only=True to every torch.load() call; EPSS is low (0.51%, ~42nd percentile), there is no CISA KEV listing, and no public exploit code was identified at time of analysis.
RemediationAI
Patch available per vendor advisory: apply upstream fix commit 7b2eed297d43dcdd1e3d45bfdfc950478e3af5d9 (https://github.com/Tencent/TFace/commit/7b2eed297d43dcdd1e3d45bfdfc950478e3af5d9), which adds weights_only=True to every torch.load() call; no tagged release number is confirmed in the available data, so pin to a repository revision at or after that commit and reference ZDI-25-1036. If you cannot patch immediately, the highest-value compensating control is to add weights_only=True manually at each torch.load() call site listed in the diff - the side effect is that legacy checkpoints holding non-tensor objects will raise errors and must be re-exported as pure state dicts. Operationally, treat checkpoint files as executable code: only load .ckpt/.pth files you produced or that carry a verified checksum/signature from a trusted source, and quarantine any 'pretrained' model delivered by a third party or fetched over an untrusted channel; this blocks the attack but breaks legitimate workflows that rely on untrusted community weights. Run TFace training, evaluation, and ONNX export as an unprivileged, containerized user rather than root so a successful pickle payload does not yield host-level control - the trade-off is possible friction with GPU device, dataset, and shared-cache permissions. If checkpoint provenance cannot be guaranteed, pre-scan files in a sandboxed process before loading them in production. Restricting who can write to the --resume/checkpoint paths and disabling auto-resume from user-supplied locations further reduces exposure.
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 PyTorch model-loading layer. torch.load() historically defaults to weights_only=False, which means the file is processed by Python's pickle machinery; a crafted checkpoint can embed a __reduce__ payload that runs arbitrary commands the moment the file is loaded, before any weight tensors are inspected. Tencent TFace's restore_checkpoint logic and numerous sibling loaders - attribute/M3DFEL/solver.py, generation/uiface/main.py (save/restore of model.ckpt and optimization.ckpt), 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, recognition/tasks/duetface/base_task.py and train.py - all called torch.load() without weights_only=True, so any of these entry points could be used to trigger deserialization. The single-component CPE (cpe:2.3:a:tencent:tface:*:*:*:*:*:*:*:*) indicates the entire toolkit, not a particular submodule, is treated as affected. The upstream remediation uniformly adds weights_only=True so the loader restricts unpickling to tensors and primitive containers; the trade-off is that legacy checkpoints containing non-tensor Python objects will now fail to load until re-exported. Severity is capped by the local, interaction-required delivery model, but integrity and confidentiality impact are both high once a payload runs, because code inherits the privileges of the training/eval process.
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
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
AV:L and UI:R because the victim must load an attacker-supplied checkpoint file; PR:N since no prior auth is needed, and C/I/A:H as code runs as root.
Primary rating from Vendor (trendmicro).
CVSS VectorVendor: trendmicro
DescriptionCVE.org
Tencent TFace restore_checkpoint 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 restore_checkpoint 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-27185.
Executive ViewAI
Tencent TFace, an open-source PyTorch-based face analysis toolkit used in ML research and biometric pipelines, loads model checkpoints in a way that lets a tampered .ckpt or .pth file run arbitrary code under the account executing the tool - which in the vendor's reference configuration is root. The attack is local and depends on an operator being persuaded to load an attacker-supplied checkpoint, so the realistic exposure is supply-chain or social-engineering driven rather than remote, and leadership should care because teams commonly download 'pretrained' models from unvetted sources and often run training jobs with elevated privileges. Exploitation likelihood is currently low (no CISA KEV listing, EPSS ~0.5%, no public exploit code identified), but a successful hit yields full host compromise and potential theft or poisoning of proprietary model assets.
Apply vendor patch. Until it is deployed, load only checkpoints from trusted, checksum-verified sources, run TFace under an unprivileged account rather than root, and process untrusted model files in an isolated sandbox or disposable container.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
NVD
CVE.org
EPSS
GitHub
Exploit-DB