{"id":"CVE-2025-32434","aliases":["CVE-2025-32434","GHSA-53q9-r3pm-6pq6","BIT-PYTORCH-2025-32434","PYSEC-2025-41"],"related":[],"kind":"vulnerability","state":"published","title":"PyTorch: `torch.load` with `weights_only=True` leads to remote code execution","summary":"PyTorch is a Python package that provides tensor computation with strong GPU acceleration and deep neural networks built on a tape-based autograd system. In version 2.5.1 and prior, a Remote Command Execution (RCE) vulnerability exists in PyTorch when loading a model using torch.load with weights_only=True. This issue has been patched in version 2.6.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"PyTorch is a Python package that provides tensor computation with strong GPU acceleration and deep neural networks built on a tape-based autograd system. In version 2.5.1 and prior, a Remote Command Execution (RCE) vulnerability exists in PyTorch when loading a model using torch.load with weights_only=True. This issue has been patched in version 2.6.0.","source":"cvelist"},{"lang":"en","text":"# Description\nI found a Remote Command Execution (RCE) vulnerability in PyTorch. When loading model using torch.load with weights_only=True, it can still achieve RCE.  \n\n# Background knowledge\nhttps://github.com/pytorch/pytorch/security \n As you can see, the PyTorch official documentation considers using `torch.load()` with `weights_only=True` to be safe.\n![image](https://github.com/user-attachments/assets/fdaa8520-d66a-473a-ab1f-163d793de298)\nSince everyone knows that weights_only=False is unsafe, so they will use the  weights_only=True to mitigate the seucirty issue.\nBut now, I just proved that even if you use weights_only=True, it can still achieve RCE.\n\n# Credit\nThis vulnerability was found by Ji'an Zhou.","format":"markdown","source":"ghsa"},{"lang":"es","text":"PyTorch es un paquete de Python que proporciona computación tensorial con una potente aceleración de GPU y redes neuronales profundas basadas en un sistema de autogradación basado en cinta. En la versión 2.5.1 y anteriores, existía una vulnerabilidad de ejecución remota de comandos (RCE) en PyTorch al cargar un modelo usando torch.load con weights_only=True. Este problema se ha corregido en la versión 2.6.0.","source":"nvd"}],"published":"2025-04-18T15:19:28.000Z","modified":"2026-09-08T08:48:24.985Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.3,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"CRITICAL"}],"cwes":["CWE-502"],"affected":[{"ranges":[{"version":"< 2.6.0","status":"affected"}],"vendor":"pytorch","product":"pytorch","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.6.0"}],"ecosystem":"PyPI","package":"torch","purl":"pkg:pypi/torch","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.6.0"}],"vendor":"linuxfoundation","product":"pytorch","cpe":"cpe:2.3:a:linuxfoundation:pytorch:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.6.0"}],"ecosystem":"PyPI","package":"torch","purl":"pkg:pypi/torch","source":"pysec"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.6.0"}],"ecosystem":"Bitnami","package":"pytorch","purl":"pkg:bitnami/pytorch","source":"bitnami"}],"references":[{"url":"https://github.com/pytorch/pytorch/security/advisories/GHSA-53q9-r3pm-6pq6","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/12/msg00000.html","tags":["web"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-32434","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/pytorch/pytorch/commit/8d4b8a920a2172523deb95bf20e8e52d50649c04","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2025-41.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pytorch/pytorch","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2025-04-18T16:06:40.000Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-32434","url":"https://www.cve.org/CVERecord?id=CVE-2025-32434","licence":"CVE Terms of Use","modified":"2025-12-01T07:05:28.923Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-53q9-r3pm-6pq6","url":"https://github.com/advisories/GHSA-53q9-r3pm-6pq6","licence":"CC-BY-4.0","modified":"2026-08-07T08:12:20.395Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-32434","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-32434","licence":"Public domain","modified":"2026-06-17T09:11:59.290Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2025-41","url":"https://osv.dev/vulnerability/PYSEC-2025-41","licence":"CC-BY-4.0","modified":"2025-05-28T15:41:47.508Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PYTORCH-2025-32434","url":"https://osv.dev/vulnerability/BIT-PYTORCH-2025-32434","licence":"Apache-2.0","modified":"2026-09-08T08:48:24.985Z"}],"updatedAt":"2026-11-25T22:58:56.775Z","epss":{"score":0.02369,"percentile":0.8428,"date":"2026-12-01T12:00:22.000Z"}}