# CVE-2024-31583: Pytorch use-after-free vulnerability

- Severity: High 7.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Published: 2024-04-17T00:00:00.000Z
- Modified: 2026-09-08T08:48:24.931Z
- Also known as: GHSA-pg7h-5qx3-wjr3, BIT-PYTORCH-2024-31583, PYSEC-2024-251
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: mitre

## Description

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

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- pytorchlightning pytorch_lightning: 2.2.0
- torch (PyPI): before 2.2.0; before 9c7071b0e324f9fb68ab881283d6b8d388a4bcd2
- linuxfoundation pytorch: before 2.2.0
- pytorch (Bitnami): before 2.2.1

## Every score

- CISA-ADP: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/pytorch/pytorch/commit/9c7071b0e324f9fb68ab881283d6b8d388a4bcd2> (fix, patch, web)
- <https://github.com/pytorch/pytorch/blob/v2.1.2/torch/csrc/jit/mobile/interpreter.cpp#L132> (product, web)
- <https://gist.github.com/1047524396/43e19a41f2b36503a4a228c32cdbc176> (advisory, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-31583> (advisory, web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2024-251.yaml> (web)
- <https://github.com/pytorch/pytorch> (package)
- <https://security.snyk.io/vuln/SNYK-PYTHON-TORCH-6619806> (web)
- <https://github.com/advisories/GHSA-pg7h-5qx3-wjr3> (advisory)

## Sources

- CVE List: [CVE-2024-31583](https://www.cve.org/CVERecord?id=CVE-2024-31583), CVE Terms of Use, modified 2024-08-02
- GitHub Advisory Database: [GHSA-pg7h-5qx3-wjr3](https://github.com/advisories/GHSA-pg7h-5qx3-wjr3), CC-BY-4.0, modified 2025-06-11
- NVD: [CVE-2024-31583](https://nvd.nist.gov/vuln/detail/CVE-2024-31583), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2024-251](https://osv.dev/vulnerability/PYSEC-2024-251), CC-BY-4.0, modified 2026-06-10
- Bitnami Vulnerability Database: [BIT-PYTORCH-2024-31583](https://osv.dev/vulnerability/BIT-PYTORCH-2024-31583), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2024-31583 · Whole record: https://cve.day/CVE-2024-31583.json · Rebuilt by cve.day 2026-11-25T22:58:39.422Z
