SecurityContext

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

IdName
CWE-918Server-Side Request Forgery

Known exploited entries

ListAdded dateDue dateRansomware use
vulncheck2025-11-26—no

Nuclei templates

IdUrl
CVE-2023-43654https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2023/CVE-2023-43654.yaml

Public exploits

UrlSourceAdded date
http://packetstormsecurity.com/files/175095/PyTorch-Model-Server-Registration-Deserialization-Remote-Code-Execution.htmlnvd2023-09-28
https://github.com/OligoCyberSecurity/CVE-2023-43654poc-in-github2024-05-28
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/torchserver_cve_2023_43654.rbmetasploit2023-10-03
https://github.com/OligoCyberSecurity/ShellTorchCheckerpoc-in-github2023-10-02
https://github.com/OligoCyberSecurity/ShellTorchChecker.gitvulncheck-xdb2023-10-02

References

UrlSourceTags
https://github.com/pytorch/serve/security/advisories/GHSA-8fxr-qfr9-p34wnvdVendor Advisory
http://packetstormsecurity.com/files/175095/PyTorch-Model-Server-Registration-Deserialization-Remote-Code-Execution.htmlnvdExploit, Third Party Advisory, VDB Entry
https://github.com/pytorch/serve/pull/2534nvdIssue Tracking
https://github.com/pytorch/serve/releases/tag/v0.8.2nvdRelease Notes
https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2023/CVE-2023-43654.yamlnuclei_templateNuclei Template
https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?host_type=src&vulnerability=cve-2023-43654vulncheckVulncheck Reported Exploitation

Products

ProductAffectedPlatform boundSourcesUrl
pytorch:torchserve>= 0.1.0, < 0.8.2nonvd/v1/products/pytorch/torchserve

Projects

RepositoryLink kindsIndexedUrl
pytorch/servepackage, pull, releases, security_advisoryyes/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

Nuclei template