{"schemaVersion":3,"id":"CVE-2024-31580","aliases":["GHSA-5pcm-hx3q-hm94","BIT-pytorch-2024-31580","PYSEC-2024-252","PYSEC-2024-328","UBUNTU-CVE-2024-31580","DEBIAN-CVE-2024-31580"],"status":"published","duplicateOf":null,"title":null,"description":"PyTorch before v2.2.0 was discovered to contain a heap buffer overflow vulnerability in the component /runtime/vararg_functions.cpp. This vulnerability allows attackers to cause a Denial of Service (DoS) via a crafted input.","dates":{"published":"2024-04-17T00:00:00.000Z","modified":"2025-03-28T23:47:41.729Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":4,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":4,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","score":4,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":6.4,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":4,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":6.4,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":4,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":6.4,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":4,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00225,"percentile":0.1241,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.00225},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00225,"percentile":0.1241}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00225,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00225,"percentile":0.1241}]},"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-122","name":"Heap-based Buffer Overflow","description":"A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().","type":"weakness","status":"Draft","abstraction":"Variant","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/122.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":"< b5c3a17c2c207ebefcb85043f0cf94be9b2fef81","noFixRecorded":false,"fixedIn":null},{"text":"< 2.2.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< b5c3a17c2c207ebefcb85043f0cf94be9b2fef81 | < 2.2.0","eol":null,"hubHref":null},{"vendor":"PyPI","product":"torch-npu","name":"torch-npu","label":"torch-npu","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/torch-npu","purlType":"pypi","versions":[{"text":"< 2.2.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.2.0","eol":null,"hubHref":null}],"affectedCount":5,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/pytorch/pytorch/commit/b5c3a17c2c207ebefcb85043f0cf94be9b2fef81","label":"github.com/pytorch/pytorch/commit/b5c3a17c2c207ebefcb85043f0cf94be9b2fef81","hostname":"github.com","tags":["WEB","FIX","REPORT","Patch"]},{"url":"https://gist.github.com/1047524396/038c78f2f007345e6f497698ace2aa3d","label":"gist.github.com/1047524396/038c78f2f007345e6f497698ace2aa3d","hostname":"gist.github.com","tags":["WEB","Advisory","REPORT","Third Party Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-31580","label":"nvd.nist.gov/vuln/detail/CVE-2024-31580","hostname":"nvd.nist.gov","tags":["Advisory","Oval"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2024-252.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2024-252.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-6649934","label":"security.snyk.io/vuln/SNYK-PYTHON-TORCH-6649934","hostname":"security.snyk.io","tags":["WEB"]},{"url":"https://github.com/advisories/GHSA-5pcm-hx3q-hm94","label":"github.com/advisories/GHSA-5pcm-hx3q-hm94","hostname":"github.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2024-31580","label":"ubuntu.com/security/CVE-2024-31580","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-31580","label":"www.cve.org/CVERecord?id=CVE-2024-31580","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2024-31580","label":"security-tracker.debian.org/tracker/CVE-2024-31580","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":"2025-03-28T23:47:41.729Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":16,"level":"low","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T03:25:12.274Z","stale":false,"partial":false}}