Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. torch
  4. ›
  5. CVE-2024-31580

CVE-2024-31580: PyTorch heap buffer overflow vulnerability

April 17, 2024 (updated June 11, 2025)

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.

References

  • gist.github.com/1047524396/038c78f2f007345e6f497698ace2aa3d
  • github.com/advisories/GHSA-5pcm-hx3q-hm94
  • github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2024-252.yaml
  • github.com/pytorch/pytorch
  • github.com/pytorch/pytorch/commit/b5c3a17c2c207ebefcb85043f0cf94be9b2fef81
  • nvd.nist.gov/vuln/detail/CVE-2024-31580
  • security.snyk.io/vuln/SNYK-PYTHON-TORCH-6649934

Code Behaviors & Features

Detect and mitigate CVE-2024-31580 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 2.2.0

Fixed versions

  • 2.2.0

Solution

Upgrade to version 2.2.0 or above.

Impact 4 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-122: Heap-based Buffer Overflow

Source file

pypi/torch/CVE-2024-31580.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:28 +0000.