Patchfirst
CVE-2023-43654 Public exploit Critical · 10.0 EPSS 42.5%

TorchServe Server-Side Request Forgery

Fix:upgrade torchserve to 0.8.2 or later Details ↓

pytorch · serve

Summary

TorchServe, PyTorch's tool for serving and scaling models in production, contains a server-side request forgery flaw in its default configuration, where missing input validation lets it be made to send HTTP download requests and write files to disk. An attacker with network access and no authentication or user interaction can make the server load a model from any URL they choose, since the default allowed_urls setting does not restrict this.

Official description · CVE.org

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.

Breakdown
71.7 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited 2 years after disclosure. Public exploit code (PoC-in-GitHub) appeared 4 days after disclosure.

  1. Disclosedday 0
  2. Public exploit codePoC-in-GitHub+4 days
  3. First seen exploitedVulnCheck KEV evidence+2 yrs

Affected versions and fixes

as published in the CVE record

pytorch serve

Affected: >= 0.1.0, < 0.8.2

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: torchserve.

Upgrade to 0.8.2 or later

pippip install "torchserve>=0.8.2"

The first fix for CVE-2023-43654. No other CVE tracked by Patchfirst affects this package.

Affected versions

If you runUpgrade to
0.1.0 up to 0.8.20.8.2

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

References

4 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close