PyTorchGHSA-5pcm-hx3q-hm94
PyTorch heap buffer overflow vulnerability
High7.5CVE-2024-31580 · Published Apr 17, 2024 · updated Jul 27, 2026
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.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| torch PyPI | < 2.2.0 | 2.2.0 |
Details and references
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-122
- Also known as
- BIT-pytorch-2024-31580, CVE-2024-31580, PYSEC-2024-252, PYSEC-2024-328
- nvd.nist.gov/vuln/detail/CVE-2024-31580
- github.com/pytorch/pytorch/commit/b5c3a17c2c207ebefcb85043f0cf94be9b2fef81
- gist.github.com/1047524396/038c78f2f007345e6f497698ace2aa3d
- github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2024-252.yaml
- github.com/pytorch/pytorch
- security.snyk.io/vuln/SNYK-PYTHON-TORCH-6649934
More PyTorch advisories
All PyTorch| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Mar 302025 | PyTorch susceptible to local Denial of Service | Low3.3 | 2.7.1-rc1 |
| Mar 102025 | A vulnerability was found in PyTorch 2.6.0+cu124 | Low2.5 | No fix yet |
| Mar 102025 | PyTorch Tuple Handler is Vulnerable to Memory Corruption through Manipulation of None Argument | Low5.0 | No fix yet |
| Oct 292024 | PyTorch: unsafe deserialization | Critical9.8 | 2.5.0 |
| Apr 192024 | PyTorch: out-of-bounds read | Medium5.5 | 2.2.0 |
| Apr 172024 | Pytorch use-after-free vulnerability | High7.8 | 2.2.0 |