Skip to main content
VulnerabilityPublished

CVE-2024-31583: pytorch · Use After Free

Affects pytorchSource CVE Database V5

0

Not known to be exploited · CVSS 7.8 High : upgrade to 2.2.0 soon.

Data as of 26 Oct 2026, 13:47 UTC

CVSS 3.1 base score
7.8High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.2% chance of exploitation in 30 days – higher than 18% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 2.2.0
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 11 Jun 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade pytorch/pytorch to 2.2.0.

Affected software

ProductAffectedFixed in
GitHubpytorch/pytorchpkg:github/pytorch/pytorchOther threatsAffected
  • <2.2.0
Fixed in
  • 2.2.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

  1. Upgrade PyTorch to version 2.2.0 or later as soon as possible to ensure the vulnerability is patched.
  2. Restrict local access to systems running vulnerable PyTorch versions to trusted users only, minimizing the risk of exploitation.
  3. Implement strict user account controls and monitor for unusual user activity that could indicate attempts to exploit the vulnerability.
  4. Use application whitelisting and endpoint protection solutions to detect and block suspicious behavior related to PyTorch processes.
  5. For environments where immediate upgrade is not feasible, consider isolating PyTorch workloads within sandboxed or containerized environments to limit potential damage.
  6. Regularly audit and update AI/ML deployment pipelines to ensure dependencies like PyTorch are kept current.
  7. Educate developers and system administrators about the risks of use-after-free vulnerabilities and the importance of applying security updates promptly.

Description

Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.

References

Community reviews

Loading reviews…