CVE-2024-35198 — Vulnerability in torchserve — CVE Details
TorchServe vulnerable to bypass of allowed_urls configuration
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (1.31%). Schedule for your next planned update.
Does your project use an affected torchserve version?
Paste your requirements.txt to check it for CVE-2024-35198 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Impact
TorchServe's check on allowed_urls configuration can be by-passed if the URL contains characters such as ".." but it does not prevent the model from being downloaded into the model store. Once a file is downloaded, it can be referenced without providing a URL the second time, which effectively bypasses the allowed_urls security check. Customers using PyTorch inference Deep Learning Containers (DLC) through Amazon SageMaker and EKS are not affected.
Patches
This issue in TorchServe has been fixed by validating the URL without characters such as ".." before downloading: #3082.
TorchServe release 0.11.0 includes the fix to address this vulnerability.
References
Thank Kroll Cyber Risk for for responsibly disclosing this issue.
If you have any questions or comments about this advisory, we ask that you contact AWS Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.
Advisory Timeline
- First published July 18, 2024 (861 days ago).
- Last revised September 10, 2026 — 783 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "torchserve>=0.11.0"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: PyPI (1).
| Package | Fixed In |
|---|---|
| torchserve PyPI · Affected: 0.0.1b20200409, 0.1.1, 0.10.0, 0.2.0 (+18 more) | 0.11.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-22Path TraversalMITRE
- CWE-706
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/pytorch/serve/security/advisories/GHSA-wxcx-gg9c-fwp2WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-35198ADVISORY
- https://github.com/pytorch/serve/pull/3082WEB
- https://github.com/pytorch/serve/commit/cdba0fd449c2fd23dcf37c54c0784035541d5114WEB
- https://github.com/pytorch/servePACKAGE
- https://github.com/pytorch/serve/releases/tag/v0.11.0WEB
Frequently Asked Questions
- What is CVE-2024-35198?
- TorchServe vulnerable to bypass of allowed_urls configuration. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
- How do I check if my project is affected by CVE-2024-35198?
- CVE-2024-35198 affects torchserve. It has a 1.3% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-35198 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is an above-median EPSS score — 70.7% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2023-43654CRITICAL
TorchServe Server-Side Request Forgery vulnerability
- CVE-2026-77359CRITICAL
Jupyter MCP Server: Browser DNS rebinding can hijack the Jupyter backend through management routes
- CVE-2026-77312CRITICAL
Flyto2 Core: Arbitrary file write via unguarded data.*/file.* modules (incomplete fix of CVE-2026-67429)