cbcvebase.
CVE-2023-43654
published 2023-09-28

CVE-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
VendorProductVersion rangeFixed in
pytorchserve
pytorchtorchserve>= 0.1.0 < 0.8.20.8.2
pytorchtorchserve>= 0.1.0 < 0.8.20.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.