| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| torchserve | pip | < 0.11.0 | 0.11.0 |
The vulnerability stems from the order of operations in ModelArchive.downloadModel. The original code in TorchServe <0.11.0 first downloaded the model archive via ArchiveUtils.downloadArchive() and only then checked for '..' in the URL. This allowed an attacker to: (1) supply a URL with '..' to trigger a ModelNotFoundException, but (2) still have the model file written to the model store. Subsequent requests could then reference the already-downloaded model without URL validation. The patch moved the '..' check before the download operation, which is evident in the commit diff where the validation block was relocated above the download call. The test cases in ModelArchiveTest.java further confirm this behavior by verifying that files with path traversal attempts are not persisted.
A Semantic Attack on Google Gemini - Read the Latest Research