CVE-2023-43654: TorchServe Server-Side Request Forgery vulnerability in torchserve

torchserve Updated 02 Oct 2025

Summary

02/10/2023
Yes i
Critical
9.8

CVE-2023-43654: TorchServe Server-Side Request Forgery vulnerability. Affects torchserve versions >= 0.1.0, < 0.8.2. Fixed in 0.8.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

TorchServe is an open-source model serving library for PyTorch, allowing users to deploy and serve PyTorch models in production environments. It provides an easy-to-use API and supports various deployment configurations. However, TorchServe versions 0.1.0 to 0.8.1 are vulnerable to a Server-Side Request Forgery (SSRF) issue.

Vulnerability Detail

The SSRF vulnerability in TorchServe arises from the lack of proper input validation in its default configuration. This allows third parties to invoke remote HTTP download requests and write files to the disk. Exploiting this vulnerability could compromise the integrity of the system and expose sensitive data. The vulnerability has a CVSS score of 9.8, indicating its critical severity.

How To Fix

Latest published version: 0.12.0 as of 22 Oct 2026

pip install --upgrade "torchserve==0.12.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.8.2

This is the first release that contains the fix.

pip install --upgrade "torchserve==0.8.2"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. The recommended approach is to upgrade to the patched version of TorchServe.

Conclusion

The TorchServe Server-Side Request Forgery vulnerability in torchserve poses a critical risk to the integrity of systems and sensitive data. It is recommended to upgrade to TorchServe version 0.8.2 or later to address this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for torchserve →

Share this vulnerability

FAQ

TorchServe is an open-source model serving library for PyTorch, designed to simplify the deployment and serving of PyTorch models in production environments.

Server-Side Request Forgery (SSRF) is a vulnerability that allows an attacker to make requests from the vulnerable server to other internal or external resources, potentially leading to unauthorized access or data leakage.

The vulnerability in TorchServe could be exploited by an attacker to invoke remote HTTP download requests and write files to the disk, compromising the system's integrity and exposing sensitive data.

To mitigate this vulnerability, it is crucial to upgrade to TorchServe version 0.8.2 or later, which includes fixes for the SSRF issue. Additionally, users should configure the 'allowed_urls' and specify the model URL to be used to ensure proper input validation.

This vulnerability was responsibly disclosed by Oligo Security. They worked with the TorchServe project to resolve the issue.

Related vulnerabilities

Recent vulnerabilities recorded for torchserve.

How To Fix

Latest published version: 0.12.0 as of 22 Oct 2026

pip install --upgrade "torchserve==0.12.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.8.2

This is the first release that contains the fix.

pip install --upgrade "torchserve==0.8.2"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback