CVE-2024-31580
Python vulnerability analysis and mitigation

Overview

PyTorch before version 2.2.0 contains a heap buffer overflow vulnerability identified as CVE-2024-31580. The vulnerability is located in the component /runtime/vararg_functions.cpp and was discovered in early 2024. This security flaw affects all PyTorch installations prior to version 2.2.0 (NVD, Debian Tracker).

Technical details

The vulnerability is classified as a heap-based buffer overflow (CWE-122) in the vararg_functions.cpp component of PyTorch's runtime. The issue occurs when handling variable arguments in the affected component, which can lead to memory corruption through improper buffer management (GitHub Gist).

Impact

When exploited, this vulnerability allows attackers to cause a Denial of Service (DoS) through crafted input. The impact primarily affects the availability of systems running vulnerable PyTorch versions (NVD).

Exploitability

The vulnerability can be triggered via crafted input targeting the vararg_functions.cpp component. A proof of concept has been documented and the vulnerability has been confirmed through security testing (GitHub Commit).

Mitigation and workarounds

The vulnerability has been fixed in PyTorch version 2.2.0. Users are advised to upgrade to this version or later to mitigate the risk. For Debian-based systems, fixed versions are available in trixie (2.6.0+dfsg-3) and sid (2.6.0+dfsg-4) distributions (Debian Tracker).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-48039CRITICAL9.1
  • Python logoPython
  • meta-ads-mcp
NoYesAug 07, 2026
CVE-2026-48169HIGH8.8
  • Python logoPython
  • praisonai-platform
NoYesAug 07, 2026
GHSA-wvpp-8hx9-p66jHIGH8.8
  • Python logoPython
  • gitpython
NoYesAug 07, 2026
CVE-2026-71870MEDIUM4.8
  • Python logoPython
  • pypdf2
NoYesAug 07, 2026
CVE-2026-71852MEDIUM4.8
  • Python logoPython
  • pypdf
NoYesAug 07, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management