{"id":"CVE-2024-31583","aliases":["AZL-39942","BIT-pytorch-2024-31583","CLSA-2025-1762906448","DEBIAN-CVE-2024-31583","EUVD-2024-1265","GHSA-pg7h-5qx3-wjr3","PYSEC-2024-251","UBUNTU-CVE-2024-31583"],"status":"published","title":"Pytorch use-after-free vulnerability","description":"Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.","severity":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"adp","from":"cve"},"epss":{"day":"2026-11-11","score":0.00266,"percentile":0.18703,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-416"],"published":"2024-04-17T00:00:00Z","modified":"2026-11-02T12:02:30Z","fixes":[{"ecosystem":"PyPI","package":"torch","fixed_in":["2.2.0"],"sources":["ghsa","osv"]},{"ecosystem":"Azure Linux:2","package":"pytorch","fixed_in":["2.0.0-4"],"sources":["osv"]},{"ecosystem":"Bitnami","package":"pytorch","fixed_in":["2.2.1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"pytorch","fixed_in":["2.4.1-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"pytorch","fixed_in":["2.4.1-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"torch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.0"}]}]},{"source":"osv","ecosystem":"Azure Linux:2","package":"pytorch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0-4"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"pytorch","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.2.1"}]}]},{"source":"osv","ecosystem":"TuxCare:PyPI","package":"torch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.13.1"},{"fixed":"1.13.1.post2+tuxcare"}]}],"versions":["1.13.1","1.13.1.post1+tuxcare"],"bundled":2},{"source":"osv","ecosystem":"Debian:12","package":"pytorch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.13.1+dfsg-4","1.13.1+dfsg-5","2.0.1+dfsg-1","2.0.1+dfsg-1~exp1","2.0.1+dfsg-2","2.0.1+dfsg-4","2.0.1+dfsg-5","2.1.2+dfsg-1","2.1.2+dfsg-2","2.1.2+dfsg-4","2.12.0+dfsg2-1","2.12.0+dfsg2-1~exp1","2.12.0+dfsg2-1~exp2","2.12.0+dfsg2-2","2.12.0+dfsg2-3","2.12.0+dfsg2-4","2.12.1+dfsg-1","2.12.1+dfsg-2","2.14.1+dfsg-1","2.14.1+dfsg-1~exp1","2.4.1-1","2.4.1-3","2.4.1-4","2.5.0+dfsg-1","2.5.1+dfsg-1","2.5.1+dfsg-3","2.5.1+dfsg-4","2.6.0+dfsg-1","2.6.0+dfsg-1~exp1","2.6.0+dfsg-2","2.6.0+dfsg-3","2.6.0+dfsg-4","2.6.0+dfsg-5","2.6.0+dfsg-7","2.6.0+dfsg-8","2.6.0+dfsg-9","2.6.0~rc9+dfsg-1~exp1","2.9.0+dfsg-1~exp1","2.9.0+dfsg-1~exp2","2.9.1+dfsg-1~exp1","2.9.1+dfsg-1~exp2"]},{"source":"osv","ecosystem":"Debian:13","package":"pytorch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.1-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"pytorch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.1-1"}]}]},{"source":"osv","ecosystem":"PyPI","package":"torch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.0"}]}],"versions":["1.0.0","1.0.1","1.1.0","1.10.0","1.10.1","1.10.2","1.11.0","1.12.0","1.12.1","1.13.0","1.13.1","1.2.0","1.3.0","1.3.1","1.4.0","1.5.0","1.5.1","1.6.0","1.7.0","1.7.1","1.8.0","1.8.1","1.9.0","1.9.1","2.0.0","2.0.1","2.1.0","2.1.1","2.1.2"]},{"source":"osv","ecosystem":"PyPI","package":"torch","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"9c7071b0e324f9fb68ab881283d6b8d388a4bcd2"},{"fixed":"9c7071b0e324f9fb68ab881283d6b8d388a4bcd2"}]},{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.0"}]}],"versions":["1.0.0","1.0.1","1.1.0","1.10.0","1.10.1","1.10.2","1.11.0","1.12.0","1.12.1","1.13.0","1.13.1","1.2.0","1.3.0","1.3.1","1.4.0","1.5.0","1.5.1","1.6.0","1.7.0","1.7.1","1.8.0","1.8.1","1.9.0","1.9.1","2.0.0","2.0.1","2.1.0","2.1.1","2.1.2","ciflow/unstable/123","bc2caa7fdf006894eff7af936babde69ab5a40f8-huydhn-debug","ciflow/periodic/3e98831","ciflow/slow/da3aba1e46157c4df504b067477cdf2b3c96b194-sdym","ciflow/slow/0d5b74da0cab798fbfdb9caa53fad816999c8386-sdym","ciflow/slow/8751002215790a3a88750faa8f4366933e296693-sdym","ciflow/slow/a837609","ciflow/slow/788ff06","ciflow/slow/1faef89","ciflow/slow/187eb7c","ciflow/slow/01c7106","ciflow/slow/3920ec1","ciflow/slow/0577043","ciflow/slow/a206e8b","ciflow/slow/59a3759","ciflow/slow/1732077","ciflow/slow/9d85864","ciflow/slow/0e81104","ciflow/slow/3b7c6b2","ciflow/slow/70ef0bb","ciflow/slow/af841f3","ciflow/slow/9ffad5b","ciflow/periodic/94512-point","ciflow/inductor/3d4b92b","ciflow/inductor/3b9a386","ciflow/inductor/d224ac7","ciflow/periodic/csl/test87519","ciflow/periodic/csltest88761","ciflow/periodic/csltest88275","ciflow/periodic/317eeb8","ciflow/periodic/2a6d37d","ciflow/periodic/3c32","ciflow/periodic/054a2fd","ciflow/periodic/sha-ec5b83","malfet/tag-2ef5611","malfet/tag-317b1a0","malfet/tag-ec6f767","nightly-binary","v1.8.0-rc1","v1.4.0a0","v1.3.0a0","v1.2.0a0","v1.1.0a0","v1.0rc1","v1.0rc0","v1.0.0a0","v0.1.11","v0.1.10","v0.1.9","v0.1.8","v0.1.7","v0.1.6","v0.1.5","v0.1.4","v0.1.3","v0.1.2","v0.1.1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"pytorch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.7.1-7","1.8.1-4"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"pytorch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.6.0+dfsg-5build1","2.6.0+dfsg-7"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"pytorch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.9.1+dfsg-1~exp1ubuntu2","2.12.1+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"pytorch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.6.0+dfsg-7","2.6.0+dfsg-9","2.9.1+dfsg-1~exp1ubuntu2"]}],"products":[{"vendor":"linuxfoundation","product":"pytorch"},{"vendor":"pytorchlightning","product":"pytorch_lightning"}],"references":[{"url":"https://github.com/pytorch/pytorch/commit/9c7071b0e324f9fb68ab881283d6b8d388a4bcd2","tags":["x_transferred","Patch","fix","web","report"]},{"url":"https://github.com/pytorch/pytorch/blob/v2.1.2/torch/csrc/jit/mobile/interpreter.cpp#L132","tags":["x_transferred","Product","web","report"]},{"url":"https://gist.github.com/1047524396/43e19a41f2b36503a4a228c32cdbc176","tags":["x_transferred","Third Party Advisory","advisory","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-31583","tags":["web","advisory"]},{"url":"https://security.snyk.io/vuln/SNYK-PYTHON-TORCH-6619806","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2024-251.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-pg7h-5qx3-wjr3","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/31xxx/CVE-2024-31583.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2024-31583","tags":["advisory"]},{"url":"https://github.com/pytorch/pytorch","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2024-31583","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-31583","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2024-31583","description":"Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.","status":"published","published":"2024-04-17T00:00:00Z","modified":"2024-08-02T01:52:57.315Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"adp"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:34:14.308905Z"}],"euvd":[{"id":"EUVD-2024-1265","description":"Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.","status":"published","published":"2024-04-17T00:00:00Z","modified":"2024-08-02T01:52:57Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-03T03:50:24.06764Z"}],"ghsa":[{"id":"GHSA-pg7h-5qx3-wjr3","title":"Pytorch use-after-free vulnerability","description":"Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.","status":"published","published":"2024-04-17T21:30:48Z","modified":"2025-06-10T14:52:03Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:38:46.901955Z"}],"nvd":[{"id":"CVE-2024-31583","description":"Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.","status":"published","published":"2024-04-17T19:15:07.95Z","modified":"2026-06-17T07:28:36.677Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:09:52.184911Z"}],"osv":[{"id":"CVE-2024-31583","description":"Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.","status":"published","published":"2024-04-17T00:00:00Z","modified":"2026-10-28T10:54:35.794414953Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:40.06138Z"},{"id":"DEBIAN-CVE-2024-31583","description":"Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.","status":"published","published":"2024-04-17T19:15:07.95Z","modified":"2026-11-02T12:02:30.043104664Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:42.530184Z"},{"id":"GHSA-pg7h-5qx3-wjr3","title":"Pytorch use-after-free vulnerability","description":"Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.","status":"published","published":"2024-04-17T21:30:48Z","modified":"2025-06-11T06:29:21.475649Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T15:46:53.244788Z"},{"id":"UBUNTU-CVE-2024-31583","description":"Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.","status":"published","published":"2024-04-17T19:15:00Z","modified":"2026-10-17T12:56:34.76132847Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T16:54:48.333535Z"},{"id":"AZL-39942","title":"CVE-2024-31583 affecting package pytorch for versions less than 2.0.0-4","description":"Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.","status":"published","published":"2024-04-17T19:15:07Z","modified":"2026-04-21T04:28:52.354039Z","updated_at":"2026-11-02T15:28:04.608733Z"},{"id":"BIT-pytorch-2024-31583","description":"Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.","status":"published","published":"2025-06-11T05:57:26.054Z","modified":"2026-09-08T08:48:24.931289317Z","updated_at":"2026-11-02T15:28:35.111822Z"},{"id":"CLSA-2025-1762906448","title":"TuxCare security update for torch (2 CVEs)","description":"TuxCare rebuilt torch to address 2 CVEs. Fixed in 1.13.1.post2+tuxcare.","status":"published","published":"2026-08-04T14:52:11Z","modified":"2026-10-20T13:45:22.68429041Z","updated_at":"2026-11-02T15:43:42.427288Z"},{"id":"PYSEC-2024-251","description":"Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.","status":"published","published":"2024-04-17T19:15:07Z","modified":"2026-06-10T17:51:26.526436006Z","updated_at":"2026-11-02T15:52:54.242332Z"}]}}
