CVE-2023-43654
published 2023-09-28CVE-2023-43654: TorchServe is a tool for serving and scaling PyTorch models in production. TorchServe default configuration lacks proper input validation, enabling third…
PriorityP187critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
ITWEXPLOITVulnCheck KEV
Exploited in the wild
EPSS
35.26%
98.2th percentile
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.
Affected
3 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| pytorch | serve | — | — |
| pytorch | torchserve | >= 0.1.0 < 0.8.2 | 0.8.2 |
| pytorch | torchserve | >= 0.1.0 < 0.8.2 | 0.8.2 |
Detection & IOCsextracted from sources · hover to see the quote
urlPOST /models?url=http%3a//{{interactsh-url}} HTTP/1.1
path/models
sigma
fofa-query: body="Requested method is not allowed, please refer to API document"
- →TorchServe management interface bound to 0.0.0.0 by default (all interfaces) instead of localhost — detect externally reachable port 8081 on internet-facing hosts as a high-risk indicator. ↗
- →Exploit chain uses HTTP POST to /models endpoint with an attacker-controlled external URL parameter to trigger SSRF model registration — monitor for POST /models requests containing external/non-allowlisted URLs.
- →Outbound HTTP requests from TorchServe process with a Java User-Agent indicate SSRF exploitation in progress — alert on Java-originated outbound HTTP to untrusted destinations.
- →Loading a MAR file containing a malicious YAML config triggers SnakeYAML deserialization RCE (CVE-2022-1471) — detect unexpected Java class loading or process spawning from the TorchServe JVM after model registration. ↗
- →TorchServe response body fingerprint 'Requested method is not allowed, please refer to API document' can be used to identify exposed TorchServe instances for targeted scanning.
- →Attacker uploads malicious models from external addresses via the unauthenticated management API — alert on model registration events sourcing from external/public IP addresses. ↗
- ·The SSRF vulnerability exists because allowed_urls defaults to accepting ALL domains — operators must explicitly restrict allowed_urls in config.properties to trusted sources only. ↗
- ·Management interface must be explicitly bound to localhost by setting management_address to http://127.0.0.1:8081 in config.properties; the default 0.0.0.0 binding exposes it to all network interfaces. ↗
- ·TorchServe 0.8.2 only adds a warning about the default allowed_urls value (via PR #2534) but does not enforce restriction — operators must still manually configure allowed_urls to fully mitigate the SSRF risk. ↗
CVSS provenance
nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vulncheck10.0CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
TorchServe Server-Side Request Forgery vulnerability
osv·2023-10-02
CVE-2023-43654 [CRITICAL] TorchServe Server-Side Request Forgery vulnerability
TorchServe Server-Side Request Forgery vulnerability
## Impact
**Remote Server-Side Request Forgery (SSRF)**
**Issue**: 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`.
**Mitigation**: The 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](https://github.com/pytorch/serve/blob/b3eced56b4d9d5d3b8597aa506a0bcf954d291bc/docs/configuration.md?plain=1#L296) and specifying the model URL to be used. A pull request to warn th
GHSA
TorchServe Server-Side Request Forgery vulnerability
ghsa·2023-10-02
CVE-2023-43654 [CRITICAL] CWE-918 TorchServe Server-Side Request Forgery vulnerability
TorchServe Server-Side Request Forgery vulnerability
## Impact
**Remote Server-Side Request Forgery (SSRF)**
**Issue**: 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`.
**Mitigation**: The 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](https://github.com/pytorch/serve/blob/b3eced56b4d9d5d3b8597aa506a0bcf954d291bc/docs/configuration.md?plain=1#L296) and specifying the model URL to be used. A pull request to warn th
VulnCheck
pytorch torchserve Server-Side Request Forgery (SSRF)
vulncheck·2023·CVSS 10.0
CVE-2023-43654 [CRITICAL] pytorch torchserve Server-Side Request Forgery (SSRF)
pytorch torchserve Server-Side Request Forgery (SSRF)
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.
No detection rules found.
Nuclei
PyTorch TorchServe SSRF
nuclei·CVSS 9.8
CVE-2023-43654 [CRITICAL] PyTorch TorchServe SSRF
PyTorch TorchServe SSRF
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.
Metasploit
PyTorch Model Server Registration and Deserialization RCE
metasploit·CVSS 9.8
CVE-2023-43654 [CRITICAL] PyTorch Model Server Registration and Deserialization RCE
PyTorch Model Server Registration and Deserialization RCE
The PyTorch model server contains multiple vulnerabilities that can be chained together to permit an unauthenticated remote attacker arbitrary Java code execution. The first vulnerability is that the management interface is bound to all IP addresses and not just the loop back interface as the documentation suggests. The second vulnerability (CVE-2023-43654) allows attackers with access to the management interface to register MAR model files from arbitrary servers. The third vulnerability is that when an MAR file is loaded, it can contain a YAML configuration file that when deserialized by snakeyaml, can lead to loading an arbitrary Java class.
arXiv
SoK: Understanding Vulnerabilities in the Large Language Model Supply Chain
arxiv_fulltext·2025-02-18
SoK: Understanding Vulnerabilities in the Large Language Model Supply Chain
SoK: Understanding Vulnerabilities in the Large Language Model Supply Chain
Shenao Wang , Yanjie Zhao , Zhao Liu , Quanchen Zou , Haoyu Wang
\ 0.5em]
Huazhong University of Science and Technology
360 AI Security Lab
## Abstract
Large Language Models (LLMs) transform artificial intelligence, driving advancements in natural language understanding, text generation, and autonomous systems. The increasing complexity of their development and deployment introduces significant security challenges, particularly within the LLM supply chain. However, existing research primarily focuses on content safety, such as adversarial attacks, jailbreaking, and backdoor attacks, while overlooking security vulnerabilities in the underlying software systems. To address this gap, this study systematically anal
Bleepingcomputer
ShellTorch flaws expose AI servers to code execution attacks
blogs_bleepingcomputer·2023-10-03·CVSS 8.3
[HIGH] ShellTorch flaws expose AI servers to code execution attacks
## ShellTorch flaws expose AI servers to code execution attacks
## Bill Toulas
A set of critical vulnerabilities dubbed 'ShellTorch' in the open-source TorchServe AI model-serving tool impact tens of thousands of internet-exposed servers, some of which belong to large organizations.
TorchServe, maintained by Meta and Amazon, is a popular tool for serving and scaling PyTorch (machine learning framework) models in production.
The library is primarily used by those engaged in AI model training and development, from academic researchers to big firms like Amazon, OpenAI, Tesla, Azure, Google, and Intel.
The TorchServe flaws discovered by the Oligo Security research team can lead to unauthorized server access and remote code execution (RCE) on vulnerable instances.
## The ShellTorch vulner
http://packetstormsecurity.com/files/175095/PyTorch-Model-Server-Registration-Deserialization-Remote-Code-Execution.htmlhttps://github.com/pytorch/serve/pull/2534https://github.com/pytorch/serve/releases/tag/v0.8.2https://github.com/pytorch/serve/security/advisories/GHSA-8fxr-qfr9-p34whttp://packetstormsecurity.com/files/175095/PyTorch-Model-Server-Registration-Deserialization-Remote-Code-Execution.htmlhttps://github.com/pytorch/serve/pull/2534https://github.com/pytorch/serve/releases/tag/v0.8.2https://github.com/pytorch/serve/security/advisories/GHSA-8fxr-qfr9-p34w
2023-09-28
Published
Exploited in the wild