CVE-2023-43654: TorchServe - Unrestricted File Upload
- Cve: CVE-2023-43654
- Name: TorchServe - Unrestricted File Upload
- Description: TorchServe is a tool for serving and scaling PyTorch models in production. TorchServe default configuration lacks proper input validation, enabling third parties to invoke remote HTTP download requests and write files to the disk. This issue could be taken advantage of to compromise the integrity of the system and sensitive data. This issue is present in versions 0.1.0 to 0.8.1. A user is able to load the model of their choice from any URL that they would like to use. The user of TorchServe is responsible for configuring both the allowed_urls and specifying the model URL to be used. A pull request to warn the user when the default value for allowed_urls is used has been merged in PR #2534. TorchServe release 0.8.2 includes this change. Users are advised to upgrade. There are no known workarounds for this issue.
- Impact: Attackers can load malicious models and write files to disk, potentially leading to system compromise and data theft.
- Remediation: Upgrade to version 0.8.2 or later.
- Vulnerability type: unrestricted_file_upload
- Vulnerability impact: remote_code_execution, file_system_write
- Requirement type: user_interaction
- Requirements: User must load model from arbitrary URL
- Labels source: projectdiscovery
- Severity: critical
- Cvss score: 9.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.42495
- Epss percentile: 0.98725
- Assignee: [email protected]
- Published at: 2023-09-28T23:15:09Z
- Age in days: 1153
- Modified at: 2026-06-17T06:26:09Z
- Patch available: yes
- Public exploits total: 5
- References total: 6
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2023-43654
- Nvd status: modified
- Checked, none or zero: public exploits capped, rejected by nvd
- Not known: hackerone
Cwe
| Id | Name |
|---|---|
| CWE-918 | Server-Side Request Forgery |
Known exploited entries
| List | Added date | Due date | Ransomware use |
|---|---|---|---|
| vulncheck | 2025-11-26 | — | no |
Nuclei templates
| Id | Url |
|---|---|
| CVE-2023-43654 | https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2023/CVE-2023-43654.yaml |
Public exploits
| Url | Source | Added date |
|---|---|---|
| http://packetstormsecurity.com/files/175095/PyTorch-Model-Server-Registration-Deserialization-Remote-Code-Execution.html | nvd | 2023-09-28 |
| https://github.com/OligoCyberSecurity/CVE-2023-43654 | poc-in-github | 2024-05-28 |
| https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/torchserver_cve_2023_43654.rb | metasploit | 2023-10-03 |
| https://github.com/OligoCyberSecurity/ShellTorchChecker | poc-in-github | 2023-10-02 |
| https://github.com/OligoCyberSecurity/ShellTorchChecker.git | vulncheck-xdb | 2023-10-02 |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/pytorch/serve/security/advisories/GHSA-8fxr-qfr9-p34w | nvd | Vendor Advisory |
| http://packetstormsecurity.com/files/175095/PyTorch-Model-Server-Registration-Deserialization-Remote-Code-Execution.html | nvd | Exploit, Third Party Advisory, VDB Entry |
| https://github.com/pytorch/serve/pull/2534 | nvd | Issue Tracking |
| https://github.com/pytorch/serve/releases/tag/v0.8.2 | nvd | Release Notes |
| https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2023/CVE-2023-43654.yaml | nuclei_template | Nuclei Template |
| https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?host_type=src&vulnerability=cve-2023-43654 | vulncheck | Vulncheck Reported Exploitation |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| pytorch:torchserve | >= 0.1.0, < 0.8.2 | no | nvd | /v1/products/pytorch/torchserve |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| pytorch/serve | package, pull, releases, security_advisory | yes | /v1/repositories/pytorch/serve |
Index
- Repositories: 3
- Checked, none or zero: repositories high signal, packages
Exploitation
- Known exploited by: vulncheck
- Vulncheck known exploited since: 2025-11-26
- Exploitation seen: yes
- Public exploit: yes
- Public exploit count: 5
- Public exploit first date: 2023-09-28
- Remote: yes
- Exposed hosts: 193
- Checked, none or zero: known exploited, initial access, authentication required
- Not known: known exploited since, initial access since, hackerone reports