{"schemaVersion":3,"id":"CVE-2024-31583","aliases":["GHSA-pg7h-5qx3-wjr3","BIT-pytorch-2024-31583","PYSEC-2024-251","UBUNTU-CVE-2024-31583","DEBIAN-CVE-2024-31583"],"status":"published","duplicateOf":null,"title":null,"description":"Pytorch before version v2.2.0 was discovered to contain a use-after-free vulnerability in torch/csrc/jit/mobile/interpreter.cpp.","dates":{"published":"2024-04-17T00:00:00.000Z","modified":"2024-08-02T01:52:57.315Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.8,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","exploitability":4.6,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","exploitability":4.6,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","exploitability":4.6,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00268,"percentile":0.17827,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.00268},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00268,"percentile":0.17827}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00268,"percentile":0.17827}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-416","name":"Use After Free","description":"The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory \"belongs\" to the code that operates on the new pointer.","type":"weakness","status":"Stable","abstraction":"Variant","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/416.html"}],"affected":[{"vendor":"debian","product":"pytorch","name":"pytorch","label":"pytorch","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/pytorch","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null},{"text":"< 2.4.1-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"All versions (No fix recorded) | < 2.4.1-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"pytorch","name":"pytorch","label":"pytorch","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/pytorch","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"linuxfoundation","product":"pytorch","name":"pytorch","label":"pytorch","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 2.2.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.2.0","eol":null,"hubHref":"/vendor/linuxfoundation/pytorch"},{"vendor":"PyPI","product":"torch","name":"torch","label":"torch","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/torch","purlType":"pypi","versions":[{"text":"< 9c7071b0e324f9fb68ab881283d6b8d388a4bcd2","noFixRecorded":false,"fixedIn":null},{"text":"< 2.2.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 9c7071b0e324f9fb68ab881283d6b8d388a4bcd2 | < 2.2.0","eol":null,"hubHref":null}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/pytorch/pytorch/commit/9c7071b0e324f9fb68ab881283d6b8d388a4bcd2","label":"github.com/pytorch/pytorch/commit/9c7071b0e324f9fb68ab881283d6b8d388a4bcd2","hostname":"github.com","tags":["WEB","FIX","REPORT","Patch"]},{"url":"https://github.com/pytorch/pytorch/blob/v2.1.2/torch/csrc/jit/mobile/interpreter.cpp#L132","label":"github.com/pytorch/pytorch/blob/v2.1.2/torch/csrc/jit/mobile/interpreter.cpp","hostname":"github.com","tags":["WEB","REPORT","Product"]},{"url":"https://gist.github.com/1047524396/43e19a41f2b36503a4a228c32cdbc176","label":"gist.github.com/1047524396/43e19a41f2b36503a4a228c32cdbc176","hostname":"gist.github.com","tags":["WEB","REPORT","Third Party Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-31583","label":"nvd.nist.gov/vuln/detail/CVE-2024-31583","hostname":"nvd.nist.gov","tags":["Advisory","Oval"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2024-251.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2024-251.yaml","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/pytorch/pytorch","label":"github.com/pytorch/pytorch","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://security.snyk.io/vuln/SNYK-PYTHON-TORCH-6619806","label":"security.snyk.io/vuln/SNYK-PYTHON-TORCH-6619806","hostname":"security.snyk.io","tags":["WEB"]},{"url":"https://github.com/advisories/GHSA-pg7h-5qx3-wjr3","label":"github.com/advisories/GHSA-pg7h-5qx3-wjr3","hostname":"github.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2024-31583","label":"ubuntu.com/security/CVE-2024-31583","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-31583","label":"www.cve.org/CVERecord?id=CVE-2024-31583","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2024-31583","label":"security-tracker.debian.org/tracker/CVE-2024-31583","hostname":"security-tracker.debian.org","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2024-04-17T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-02T01:52:57.315Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":31,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T11:34:35.093Z","stale":false,"partial":false}}