Tencent FaceDetection-DSFD CVE-2025-13715
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious PyTorch .pth model file
-
ExploitDeliver via page/file to victim
-
Executiontorch.load() deserializes untrusted pickle
-
ImpactArbitrary code executes 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 file through the resnet code path, where torch.load() (self.model_path) deserializes a Python pickle without validation (CWE-502). The concrete prerequisite is that the application loads a PyTorch .pth/weights file whose origin the attacker controls. Limiting factors that reduce real-world risk: user interaction is mandatory (UI:R - the target must actively open the malicious file or visit the delivering page), the vector is local rather than network (AV:L), and the affected product is a niche open-source research project, so there is no default network-exposed service to attack. There is no authentication barrier for the attacker (PR:N), but the social-engineering/interaction gate is the practical constraint. |
| Impact | Signals point to a serious-but-constrained issue rather than a widespread emergency. The CVSS 3.0 base score of 7.8 (HIGH) is driven by total impact (C:H/I:H/A:H) and code execution as root, but the vector is LOCAL (AV:L) and requires user interaction (UI:R) - the victim must open or load an attacker-supplied PyTorch model file. This is the classic CWE-502 pickle-deserialization flaw in torch.load(), confirmed by the source diff touching model/resnet.py. EPSS is low at 0.43% (36th percentile), there is no CISA KEV listing, and no public exploit was identified, so automated mass-exploitation is unlikely; SSVC-style reading is exploitation=none, automatable=no (interaction-gated), technical impact=total. CONFLICT TO VERIFY: the description calls these 'remote attackers' who 'visit a malicious page or open a malicious file', yet the CVSS vector is AV:L (local) - this is ZDI's standard framing for file/model-delivered RCE and should be read as local-with-user-interaction, not network-remote. Additional caveat: the linked 'fix' commit only adds map_location to torch.load() and does NOT actually remediate the pickle deserialization, so the referenced patch may be incomplete - verify with the vendor before treating it as fixed. Net: real and high-impact for anyone running this research code, but low urgency given the niche footprint and interaction requirement. |
| Exploit ScenarioDerived | An attacker crafts a malicious PyTorch model (.pth) file containing a pickle payload and tricks a user into loading it through the resnet model path (e.g., hosting it on a page or sending it as a 'pretrained weights' file). When the victim runs the DSFD resnet code, torch.load() deserializes the untrusted data and executes the attacker's code as root. No public exploit was identified at time of analysis, though the technique (pickle RCE via torch.load) is well understood. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
Deserialization of untrusted data in Tencent FaceDetection-DSFD's resnet model loader (model/resnet.py) allows an attacker to execute arbitrary code at root privilege on installations where a victim loads an attacker-supplied PyTorch weights file. The flaw is CWE-502: self.model_path is passed directly to torch.load(), which deserializes a Python pickle without validation. Exploitation requires user interaction (the target must open or be delivered the malicious model file) and the vector is local (AV:L) and unauthenticated (PR:N); EPSS is low at 0.43% (36th percentile), no public exploit code was identified at time of analysis, and the project is a niche open-source research codebase with no default network-exposed service, so risk is serious but constrained rather than a widespread emergency.
RemediationAI
Apply the upstream commit a941d089d8ae2df5292a904e79d88649cb58a440 (https://github.com/Tencent/FaceDetection-DSFD/commit/a941d089d8ae2df5292a904e79d88649cb58a440); note this is an upstream fix commit rather than a confirmed tagged release, and its map_location change alone does not close the pickle path - treat it as a minimum and additionally harden the loader. Concretely: change the call to torch.load(self.model_path, map_location=..., weights_only=True) so only tensors are unpickled, or migrate checkpoints to the safetensors format; the trade-off is that legacy checkpoints containing custom classes will fail to load and must be re-serialized. Enforce integrity on model artifacts (hash allowlist of known-good .pth files) and never accept a model_path from untrusted input, upload endpoints, or downloaded archives - this blocks the social-engineering delivery vector that the UI:R requirement implies. Run inference as a non-root, low-privilege user or inside a container/VM so that a successful deserialization does not yield root-level code execution, accepting the operational overhead of permission and device-access plumbing. For triage reference, consult ZDI-25-1183 (https://www.zerodayinitiative.com/advisories/ZDI-25-1183/). No patch version was identified in the provided data beyond the referenced commit, and no exploitation has been confirmed in the wild.
Affected ProductsAI
Affected is Tencent FaceDetection-DSFD, the open-source DSFD face detection project (GitHub Tencent/FaceDetection-DSFD), specifically the ResNet code path in model/resnet.py that loads checkpoint weights via torch.load(self.model_path). No CPE identifiers or explicit tagged version numbers were provided in the intelligence data; the practical boundary is the state of the repository prior to the fix commit a941d089d8ae2df5292a904e79d88649cb58a440 (referenced from NVD). Any deployment - research reproduction, demo pipeline, or downstream fork - that loads externally supplied .pth/weights files through this loader is in scope. Vendor detail is documented in the Zero Day Initiative advisory ZDI-25-1183 (https://www.zerodayinitiative.com/advisories/ZDI-25-1183/), with the upstream change at https://github.com/Tencent/FaceDetection-DSFD/commit/a941d089d8ae2df5292a904e79d88649cb58a440.
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
FaceDetection-DSFD is Tencent's open-source Dual Shot Face Detector research implementation, and the affected component is the ResNet backbone wrapper in model/resnet.py whose _init_modules() routine restores pretrained weights. The root cause is CWE-502: PyTorch's torch.load() uses Python pickle deserialization by default, so any file reachable through self.model_path can embed a __reduce__ payload that executes arbitrary Python (and therefore shell) commands during model loading. Because the loader runs in the same process context as the inference application - frequently launched as root in research/demo setups - code executes with those privileges. Note that the referenced upstream commit a941d089d8ae2df5292a904e79d88649cb58a440 only adds a map_location lambda to torch.load; storage remapping does not disable pickle execution, so the underlying untrusted-deserialization path persists unless weights_only=True (or a non-pickle format such as safetensors) is used. No CPE strings were supplied, and the CVSS vector is 3.0/AV:L/AC:L/PR:N/UI:R with the independent assessment normalizing to CVSS:3.1 on the same metrics.
Know when Pytorch 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
File/model-delivered pickle RCE is local (AV:L) and interaction-gated (UI:R); attacker needs no privileges (PR:N) and code runs as root for total C/I/A impact.
Primary rating from Vendor (trendmicro).
CVSS VectorVendor: trendmicro
DescriptionCVE.org
Tencent FaceDetection-DSFD resnet Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Tencent FaceDetection-DSFD. 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 resnet 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-27197.
Executive ViewAI
Tencent's FaceDetection-DSFD research codebase contains a high-severity deserialization flaw (CVE-2025-13715, CVSS 7.8) that lets a malicious PyTorch weights file execute arbitrary code at root when loaded. The exposure is concentrated in data science and ML engineering teams that ingest third-party model files into this niche open-source framework rather than in customer-facing network services. Leadership should treat this as a supply-chain and developer-workstation risk requiring controls on model artifact provenance, not as a broad internet-facing emergency, since exploitation requires a victim to load an attacker-supplied file and no public exploit has been identified.
No vendor-released patch identified at time of analysis; interim mitigations are to block loading of untrusted PyTorch weights files, run the framework in a sandboxed container or VM under a non-root account, verify model artifact provenance and hashes, prefer safe serialization formats such as safetensors, and apply endpoint detection for suspicious process behavior from Python ML workloads.
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.
TorchServe is a tool for serving and scaling PyTorch models in production. Rated critical severity (CVSS 9.8), this vuln
In PyTorch <=2.4.1, the RemoteModule has Deserialization RCE. Rated critical severity (CVSS 9.8), this vulnerability is
PickleScan before 0.0.23 can be bypassed by flipping specific ZIP file header flag bits, allowing malicious pickle files
In PyTorch before trunk/89695, torch.jit.annotations.parse_type_line can cause arbitrary code execution because eval is
PyTorch is a Python package that provides tensor computation. [CVSS 8.8 HIGH]
A vulnerability in lightning-ai/pytorch-lightning version 2.3.2 allows an attacker to cause a denial of service by sendi
Out-of-bounds heap read in PyTorch torchvision's native GIF decoder (versions through 0.28.0) lets attackers who supply
picklescan before 0.0.23 is vulnerable to a ZIP archive manipulation attack that causes it to crash when attempting to e
TorchServe is a flexible and easy-to-use tool for serving and scaling PyTorch models in production. Rated critical sever
PyTorch is a Python package that provides tensor computation with strong GPU acceleration and deep neural networks built
NVIDIA APEX for Linux contains a deserialization of untrusted data vulnerability that affects environments using PyTorch
A vulnerability, which was classified as problematic, has been found in PyTorch 2.6.0+cu124. Rated medium severity (CVSS
NVD
CVE.org
EPSS
GitHub
Exploit-DB