{"id":"CVE-2024-31580","aliases":["CVE-2024-31580","GHSA-5pcm-hx3q-hm94","BIT-PYTORCH-2024-31580","PYSEC-2024-252","PYSEC-2024-328"],"related":[],"kind":"vulnerability","state":"published","title":"PyTorch heap buffer overflow vulnerability","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"Se descubrió que PyTorch anterior a v2.2.0 contenía una vulnerabilidad de desbordamiento de búfer de almacenamiento dinámico en el componente /runtime/vararg_functions.cpp. Esta vulnerabilidad permite a los atacantes provocar una denegación de servicio (DoS) mediante una entrada manipulada.","source":"nvd"}],"published":"2024-04-17T00:00:00.000Z","modified":"2026-09-08T08:48:18.902Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":4,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":4,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-122"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"2.2.0","status":"affected"}],"vendor":"pytorch","product":"pytorch","cpe":"cpe:2.3:a:pytorch:pytorch:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.2.0"}],"ecosystem":"PyPI","package":"torch","purl":"pkg:pypi/torch","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.2.0"}],"vendor":"linuxfoundation","product":"pytorch","cpe":"cpe:2.3:a:linuxfoundation:pytorch:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"b5c3a17c2c207ebefcb85043f0cf94be9b2fef81"},{"type":"git","status":"affected","fixed":"b5c3a17c2c207ebefcb85043f0cf94be9b2fef81"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.2.0"}],"ecosystem":"PyPI","package":"torch","purl":"pkg:pypi/torch","repo":"https://github.com/pytorch/pytorch","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.2.0"}],"ecosystem":"PyPI","package":"torch-npu","purl":"pkg:pypi/torch-npu","source":"pysec"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.2.1"}],"ecosystem":"Bitnami","package":"pytorch","purl":"pkg:bitnami/pytorch","source":"bitnami"}],"references":[{"url":"https://github.com/pytorch/pytorch/commit/b5c3a17c2c207ebefcb85043f0cf94be9b2fef81","tags":["fix","patch","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://gist.github.com/1047524396/038c78f2f007345e6f497698ace2aa3d","tags":["advisory","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-31580","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2024-252.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pytorch/pytorch","tags":["package"],"sources":["ghsa"]},{"url":"https://security.snyk.io/vuln/SNYK-PYTHON-TORCH-6649934","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-5pcm-hx3q-hm94","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2024-05-10T18:39:32.971Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-31580","url":"https://www.cve.org/CVERecord?id=CVE-2024-31580","licence":"CVE Terms of Use","modified":"2025-03-28T23:47:41.729Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5pcm-hx3q-hm94","url":"https://github.com/advisories/GHSA-5pcm-hx3q-hm94","licence":"CC-BY-4.0","modified":"2026-07-27T12:26:34.306Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-31580","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-31580","licence":"Public domain","modified":"2026-06-17T07:28:36.197Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2024-252","url":"https://osv.dev/vulnerability/PYSEC-2024-252","licence":"CC-BY-4.0","modified":"2026-07-27T12:26:34.306Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2024-328","url":"https://osv.dev/vulnerability/PYSEC-2024-328","licence":"CC-BY-4.0","modified":"2026-07-27T12:26:34.306Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PYTORCH-2024-31580","url":"https://osv.dev/vulnerability/BIT-PYTORCH-2024-31580","licence":"Apache-2.0","modified":"2026-09-08T08:48:18.902Z"}],"updatedAt":"2026-11-25T22:58:39.421Z","epss":{"score":0.00225,"percentile":0.14083,"date":"2026-12-01T12:00:22.000Z"}}