CVE-2023-43654 TorchServe Server-Side Request Forgery

Critical 10.0 Published Updated

Attackers can exploit TorchServe's default configuration to trigger remote HTTP requests and write files, compromising system integrity and sensitive data.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-43654?

CVE-2023-43654 is a critical server-side request forgery vulnerability in pytorch serve, published on 28 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-918

Which versions are affected by CVE-2023-43654?

3 open source packages ship an affected version, including torchserve. It affects 1 product.

PackageAffectedFixed in
torchserve PyPIFrom 0.1.00.8.2
torchserve PyPIFrom 0.1.00.8.2
torchserve PyPIFrom 0.1.00.8.2

Products include Pytorch Torchserve.

How do I fix CVE-2023-43654?

Upgrade torchserve to 0.8.2 or later.

Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.

Is CVE-2023-43654 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-43654 exists.

Public exploit code: 1 Metasploit module, 1 Nuclei template and 2 proofs of concept on GitHub.

Sources

Also known as GHSA-8fxr-qfr9-p34w, PYSEC-2026-553.

Is CVE-2023-43654 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free