{"id":"CVE-2024-31583","details":"Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.","aliases":["BIT-pytorch-2024-31583","GHSA-pg7h-5qx3-wjr3","PYSEC-2024-251"],"modified":"2026-08-12T16:23:51.684671Z","published":"2024-04-17T00:00:00Z","database_specific":{"cna_assigner":"mitre","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/31xxx/CVE-2024-31583.json"},"references":[{"type":"WEB","url":"https://gist.github.com/1047524396/43e19a41f2b36503a4a228c32cdbc176"},{"type":"WEB","url":"https://github.com/pytorch/pytorch/blob/v2.1.2/torch/csrc/jit/mobile/interpreter.cpp#L132"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/31xxx/CVE-2024-31583.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-31583"},{"type":"FIX","url":"https://github.com/pytorch/pytorch/commit/9c7071b0e324f9fb68ab881283d6b8d388a4bcd2"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/pytorch/pytorch","events":[{"introduced":"0"},{"fixed":"8ac9b20d4b090c213799e81acf48a55ea8d437d6"},{"fixed":"9c7071b0e324f9fb68ab881283d6b8d388a4bcd2"}],"database_specific":{"cpe":"cpe:2.3:a:linuxfoundation:pytorch:*:*:*:*:*:python:*:*","extracted_events":[{"introduced":"0"},{"fixed":"2.2.0"}],"source":["CPE_RANGE","REFERENCES"]}}],"versions":["v2.2.0-rc6","v2.2.0-rc5","v2.2.0-rc4","v2.2.0-rc3","v2.2.0-rc2","v2.2.0-rc1","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"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-31583.json","vanir_signatures_modified":"2026-08-12T16:23:51Z","vanir_signatures":[{"signature_type":"Line","signature_version":"v1","source":"https://github.com/pytorch/pytorch/commit/9c7071b0e324f9fb68ab881283d6b8d388a4bcd2","target":{"file":"torch/csrc/jit/mobile/interpreter.cpp"},"deprecated":false,"digest":{"threshold":0.9,"line_hashes":["171281326269689921682436190839311291909","121189681070032044894008676224246023172","104354271034547263340410601184272323230"]},"id":"CVE-2024-31583-aad0f3a9"},{"source":"https://github.com/pytorch/pytorch/commit/9c7071b0e324f9fb68ab881283d6b8d388a4bcd2","target":{"file":"torch/csrc/jit/mobile/interpreter.cpp","function":"InterpreterState::run"},"deprecated":false,"digest":{"function_hash":"60056572103566064283522839713397962286","length":5454},"id":"CVE-2024-31583-d97f5c85","signature_type":"Function","signature_version":"v1"}]}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}