CVE-2024-31583
Pytorch use-after-free vulnerability
Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.8
Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.
- Record
CVE-2024-31583- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
EUVDEUVD-2024-1265
7.8
Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.
- Record
EUVD-2024-1265- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-pg7h-5qx3-wjr3
7.8
Pytorch use-after-free vulnerability
Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.
- Record
GHSA-pg7h-5qx3-wjr3- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
NVD
7.8
Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.
- Record
CVE-2024-31583- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
OSV
7.8
Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.
- Record
CVE-2024-31583- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2024-31583
7.8
Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.
- Record
DEBIAN-CVE-2024-31583- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 6 moreShow less
OSVGHSA-pg7h-5qx3-wjr3
7.8
Pytorch use-after-free vulnerability
Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.
- Record
GHSA-pg7h-5qx3-wjr3- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2024-31583
7.8
Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.
- Record
UBUNTU-CVE-2024-31583- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVAZL-39942 No score
CVE-2024-31583 affecting package pytorch for versions less than 2.0.0-4
Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.
- Record
AZL-39942- Updated
- 2026-11-02
OSVBIT-pytorch-2024-31583 No score
Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.
- Record
BIT-pytorch-2024-31583- Updated
- 2026-11-02
OSVCLSA-2025-1762906448 No score
TuxCare security update for torch (2 CVEs)
TuxCare rebuilt torch to address 2 CVEs. Fixed in 1.13.1.post2+tuxcare.
- Record
CLSA-2025-1762906448- Updated
- 2026-11-02
OSVPYSEC-2024-251 No score
Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.
- Record
PYSEC-2024-251- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
torchPyPI |
before 2.2.0 | 2.2.0 |
pytorchAzure Linux:2 |
before 2.0.0-4 | 2.0.0-4 |
pytorchBitnami |
before 2.2.1 | 2.2.1 |
torchTuxCare:PyPI From an advisory covering 2 CVEs |
1.13.1 up to 1.13.1.post2+tuxcare, plus listed versions 1.13.1.post1+tuxcare |
1.13.1.post2+tuxcare |
pytorchDebian:12 |
All versions, plus listed versions 1.13.1+dfsg-41.13.1+dfsg-52.0.1+dfsg-12.0.1+dfsg-1~exp12.0.1+dfsg-2 Show 36 moreShow less2.0.1+dfsg-42.0.1+dfsg-52.1.2+dfsg-12.1.2+dfsg-22.1.2+dfsg-42.12.0+dfsg2-12.12.0+dfsg2-1~exp12.12.0+dfsg2-1~exp22.12.0+dfsg2-22.12.0+dfsg2-32.12.0+dfsg2-42.12.1+dfsg-12.12.1+dfsg-22.14.1+dfsg-12.14.1+dfsg-1~exp12.4.1-12.4.1-32.4.1-42.5.0+dfsg-12.5.1+dfsg-12.5.1+dfsg-32.5.1+dfsg-42.6.0+dfsg-12.6.0+dfsg-1~exp12.6.0+dfsg-22.6.0+dfsg-32.6.0+dfsg-42.6.0+dfsg-52.6.0+dfsg-72.6.0+dfsg-82.6.0+dfsg-92.6.0~rc9+dfsg-1~exp12.9.0+dfsg-1~exp12.9.0+dfsg-1~exp22.9.1+dfsg-1~exp12.9.1+dfsg-1~exp2 |
None known |
pytorchDebian:13 |
before 2.4.1-1 | 2.4.1-1 |
pytorchDebian:14 |
before 2.4.1-1 | 2.4.1-1 |
torchPyPI |
before 2.2.0, plus listed versions 1.0.01.0.11.1.01.10.01.10.1 Show 24 moreShow less1.10.21.11.01.12.01.12.11.13.01.13.11.2.01.3.01.3.11.4.01.5.01.5.11.6.01.7.01.7.11.8.01.8.11.9.01.9.12.0.02.0.12.1.02.1.12.1.2 |
2.2.0 |
torchPyPI |
before 2.2.0, plus listed versions 1.0.01.0.11.1.01.10.01.10.1 Show 45 moreShow less1.10.21.11.01.12.01.12.11.13.01.13.11.2.01.3.01.3.11.4.01.5.01.5.11.6.01.7.01.7.11.8.01.8.11.9.01.9.12.0.02.0.12.1.02.1.12.1.2ciflow/unstable/123bc2caa7fdf006894eff7af936babde69ab5a40f8-huydhn-debugciflow/periodic/3e98831ciflow/slow/da3aba1e46157c4df504b067477cdf2b3c96b194-sdymciflow/slow/0d5b74da0cab798fbfdb9caa53fad816999c8386-sdymciflow/slow/8751002215790a3a88750faa8f4366933e296693-sdymciflow/slow/a837609ciflow/slow/788ff06ciflow/slow/1faef89ciflow/slow/187eb7cciflow/slow/01c7106ciflow/slow/3920ec1ciflow/slow/0577043ciflow/slow/a206e8bciflow/slow/59a3759ciflow/slow/1732077ciflow/slow/9d85864ciflow/slow/0e81104ciflow/slow/3b7c6b2ciflow/slow/70ef0bbciflow/slow/af841f3 |
2.2.0 |
pytorchUbuntu:22.04:LTS |
All versions, plus listed versions 1.7.1-71.8.1-4 |
None known |
pytorchUbuntu:25.10 |
All versions, plus listed versions 2.6.0+dfsg-5build12.6.0+dfsg-7 |
None known |
pytorchUbuntu:26.10 |
All versions, plus listed versions 2.9.1+dfsg-1~exp1ubuntu22.12.1+dfsg-1 |
None known |
pytorchUbuntu:26.04:LTS |
All versions, plus listed versions 2.6.0+dfsg-72.6.0+dfsg-92.9.1+dfsg-1~exp1ubuntu2 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-31583 is a high vulnerability (CVSS 7.8) in Linuxfoundation Pytorch, published April 17, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.27%, the 18th percentile. Fixed in torch 2.2.0.
References
github.com/pytorch/pytorch/commit/9c7071b0e324f9fb68ab881283d6b8d388a4bcd2
github.com/pytorch/pytorch/blob/v2.1.2/torch/csrc/jit/mobile/interpreter.cpp
gist.github.com/1047524396/43e19a41f2b36503a4a228c32cdbc176
nvd.nist.gov/vuln/detail/CVE-2024-31583
security.snyk.io/vuln/SNYK-PYTHON-TORCH-6619806
github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2024-251.yaml
Left out here: 36 versions. The JSON record has them.