Skip to content
OpenAdvisories
Medium · 4.0 CVE-2024-31580 BIT-pytorch-2024-31580EUVD-2024-1105GHSA-5pcm-hx3q-hm94PYSEC-2024-252PYSEC-2024-328

PyTorch heap buffer overflow vulnerability

Published Apr 17, 2024 · Updated Mar 28, 2025 · Assigned by mitre

Description

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 pytorch 2.4.1-1 —
Debian 13 pytorch 2.4.1-1 —
Debian 12 pytorch No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 pytorch No fix yet —
Ubuntu 25.10 pytorch No fix yet —
Ubuntu 22.04 LTS pytorch No fix yet —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) pytorch 2.0.0-4 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI torch < 2.2.0 2.2.0 GHSA-5pcm-hx3q-hm94
PyPI torch-npu < 2.2.0 2.2.0 PYSEC-2024-328

Advisories 1

References