CVE-2024-31583: pytorch · Use After Free
Affects pytorchSource CVE Database V5
Not known to be exploited · CVSS 7.8 High : upgrade to 2.2.0 soon.
Data as of 26 Oct 2026, 13:47 UTC
- 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:HExploitation evidence
Disclosed: evidence found.
CVE published 11 Jun 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by 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
| Product | Affected | Fixed in |
|---|---|---|
GitHubpytorch/pytorchpkg:github/pytorch/pytorchOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
- Upgrade PyTorch to version 2.2.0 or later as soon as possible to ensure the vulnerability is patched.
- Restrict local access to systems running vulnerable PyTorch versions to trusted users only, minimizing the risk of exploitation.
- Implement strict user account controls and monitor for unusual user activity that could indicate attempts to exploit the vulnerability.
- Use application whitelisting and endpoint protection solutions to detect and block suspicious behavior related to PyTorch processes.
- For environments where immediate upgrade is not feasible, consider isolating PyTorch workloads within sandboxed or containerized environments to limit potential damage.
- Regularly audit and update AI/ML deployment pipelines to ensure dependencies like PyTorch are kept current.
- 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.