Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2024-31580 — pytorch

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-122 OSV
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

PyTorch 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.

How this vulnerability can be exploited

This issue can be reached with local access to the system, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability low.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

  • Attack vector: Local — a local account, shell or session on the host is needed.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: None.
  • Integrity impact: None.
  • Availability impact: Low — limited, and the attacker does not choose what is affected.

Weakness class

CVE-2024-31580 is classified as CWE-122: Heap-based Buffer Overflow. A write past the end of a heap allocation corrupts allocator metadata or neighbouring objects.

Affected software

CVE-2024-31580 is recorded against 3 packages.

  • pytorch
  • torch (fixed in 2.2.0)
  • torch-npu (fixed in 2.2.0)

Timeline and source

Published on 11 June 2025 and last revised on 27 July 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from OSV.

References

gist.github.com (Web)
github.com (Web)
nvd.nist.gov (Web)

Other advisories for this package

pytorch has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-122: Heap-based Buffer Overflow) in other software:

CVE-2024-31580 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity MEDIUM
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CWE CWE-122
Public Exploit ✅ No
Source OSV
Published 2025-06-11
Updated 2026-08-20
Modified 2026-07-27

Affected Packages

Software From version Fixed in
pytorch
torch 2.2.0
torch-npu 2.2.0

Similar Threats

Site Security Check

Is pytorch part of your stack?

CVE-2024-31580 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2024