CVE-2023-43654: TorchServe Server-Side Request Forgery Vulnerability
Summary
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 ↓
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.
No signup required · Results in about 60 seconds
Background
TorchServe is an open-source model serving framework for PyTorch that simplifies the deployment of machine learning models at scale. It provides features such as multi-model serving, model versioning, and RESTful APIs for inference. However, it has been found to have a critical vulnerability that allows unauthorized remote HTTP requests, potentially compromising system integrity.
Vulnerability Detail
The vulnerability identified as CVE-2023-43654 is a Server-Side Request Forgery (SSRF) issue in TorchServe. This flaw arises from the default configuration of TorchServe, which lacks adequate input validation. As a result, malicious actors can exploit this vulnerability to send unauthorized HTTP requests to remote servers, leading to potential data breaches and system integrity issues. The affected versions range from 0.1.0 to 0.8.1, and the CVSS score for this vulnerability is 9.8, indicating a critical severity level.
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
As a temporary workaround, users can manually set the 'allowed_urls' configuration to limit access to trusted domains only. This can be done by modifying the configuration file or using the following command: 'torchserve --allowed-urls <trusted_url>'.
Conclusion
The CVE-2023-43654 vulnerability in TorchServe poses a significant risk due to its SSRF nature, allowing unauthorized access to remote servers. Users are strongly advised to update to version 0.8.2 or later and configure their settings to mitigate potential risks.
See every vulnerability recorded for torchserve →
FAQ
The vulnerability allows unauthorized remote HTTP requests, which can lead to data breaches and compromise system integrity.
Versions from 0.1.0 to 0.8.1 are affected by this vulnerability.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If you cannot update, ensure that you configure the 'allowed_urls' setting to restrict access to trusted domains as a temporary workaround.
For more information, you can contact AWS/Amazon Security via their vulnerability reporting page or email aws-security@amazon.com.
References
Related vulnerabilities
Recent vulnerabilities recorded for torchserve.