CVE-2024-31580
MEDIUM 4.0CVSS 3.1PyTorch heap buffer overflow vulnerability
PyTorch before v2.2.0 was discovered to contain a heap buffer overflow vulnerability in the component /runtime/vararg_functions.cpp. This vulnerability allows attackers to cause a Denial of Service (DoS) via a crafted input.
- Published
- 17 Apr 2024
- Last modified
- 27 Jul 2026
- Assigned by
- cve@mitre.org
- NVD status
- Analyzed
- Weakness
- CWE-122
- Also known as
- BIT-pytorch-2024-31580GHSA-5pcm-hx3q-hm94PYSEC-2024-252PYSEC-2024-328
- Sources
- NVDJSONOSV GHSA-5pcm-hx3q-hm94JSONOSV PYSEC-2024-252JSONOSV PYSEC-2024-328JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N | |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | MEDIUM 4.0 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| OSV | PyPA | CVSS 3.1 | MEDIUM 4.0 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | linuxfoundation | pytorchcpe:2.3:a:linuxfoundation:pytorch:*:*:*:*:*:python:*:* |
< 2.2.0 | 2.2.0 |
| OSV | PyPI | torch | < 2.2.0 | 2.2.0 |
| OSV | PyPI | torch-npu | < 2.2.0 | 2.2.0 |
References
- https://gist.github.com/1047524396/038c78f2f007345e6f497698ace2aa3d · Third Party Advisory, WEB, ADVISORY
- https://github.com/pytorch/pytorch/commit/b5c3a17c2c207ebefcb85043f0cf94be9b2fef81 · Patch, WEB, FIX
- https://nvd.nist.gov/vuln/detail/CVE-2024-31580 · ADVISORY
- https://github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2024-252.yaml · WEB
- https://github.com/pytorch/pytorch · PACKAGE
- https://security.snyk.io/vuln/SNYK-PYTHON-TORCH-6649934 · WEB
- https://github.com/advisories/GHSA-5pcm-hx3q-hm94 · ADVISORY
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 17 Apr 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 17 Apr 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 17 Apr 2024)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 17 Apr 2024)