{"id":"CVE-2026-31221","aliases":["CVE-2026-31221","GHSA-75m9-98v2-hjpm","PYSEC-2026-3043","PYSEC-2026-3972"],"related":[],"kind":"vulnerability","state":"published","title":"PyTorch Lightning load_from_checkpoint has an insecure checkpoint deserialization","summary":"PyTorch-Lightning versions 2.6.0 and earlier contain an insecure deserialization vulnerability (CWE-502) in the checkpoint loading mechanism. The LightningModule.load_from_checkpoint() method, which is commonly used to load saved model states, internally calls torch.load() without setting the security-restrictive weights_only=True parameter. This default behavior allows the deserialization of arbitrary Python objects via the Pickle module. A remote attacker can exploit this by providing a maliciously crafted checkpoint file, leading to arbitrary code execution on the victim's system when the file is loaded.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"PyTorch-Lightning versions 2.6.0 and earlier contain an insecure deserialization vulnerability (CWE-502) in the checkpoint loading mechanism. The LightningModule.load_from_checkpoint() method, which is commonly used to load saved model states, internally calls torch.load() without setting the security-restrictive weights_only=True parameter. This default behavior allows the deserialization of arbitrary Python objects via the Pickle module. A remote attacker can exploit this by providing a maliciously crafted checkpoint file, leading to arbitrary code execution on the victim's system when the file is loaded.","source":"cvelist"},{"lang":"es","text":"Las versiones 2.6.0 y anteriores de PyTorch-Lightning contienen una vulnerabilidad de deserialización insegura (CWE-502) en el mecanismo de carga de puntos de control. El método LightningModule.load_from_checkpoint(), que se usa comúnmente para cargar estados de modelos guardados, llama internamente a torch.load() sin establecer el parámetro de restricción de seguridad weights_only=True. Este comportamiento predeterminado permite la deserialización de objetos Python arbitrarios a través del módulo Pickle. Un atacante remoto puede explotar esto al proporcionar un archivo de punto de control creado maliciosamente, lo que lleva a la ejecución de código arbitrario en el sistema de la víctima cuando se carga el archivo.","source":"nvd"}],"published":"2026-05-12T00:00:00.000Z","modified":"2026-11-08T16:10:00.183Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-502"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"2.6.0"}],"ecosystem":"PyPI","package":"pytorch-lightning","purl":"pkg:pypi/pytorch-lightning","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"2.6.0"}],"vendor":"lightningai","product":"pytorch_lightning","cpe":"cpe:2.3:a:lightningai:pytorch_lightning:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"2.6.0"}],"ecosystem":"PyPI","package":"pytorch-lightning","purl":"pkg:pypi/pytorch-lightning","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"2.6.0"}],"ecosystem":"PyPI","package":"lightning","purl":"pkg:pypi/lightning","source":"pysec"}],"references":[{"url":"https://github.com/Lightning-AI/pytorch-lightning","tags":["package","product"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.notion.so/CVE-2026-31221-35d1e1393188815f8db7c4fd08076639","tags":["exploit","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31221","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/pytorch-lightning","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-75m9-98v2-hjpm","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-05-15T18:02:25.761Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31221","url":"https://www.cve.org/CVERecord?id=CVE-2026-31221","licence":"CVE Terms of Use","modified":"2026-05-15T18:05:39.679Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-75m9-98v2-hjpm","url":"https://github.com/advisories/GHSA-75m9-98v2-hjpm","licence":"CC-BY-4.0","modified":"2026-09-10T17:25:50.009Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31221","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31221","licence":"Public domain","modified":"2026-11-08T16:10:00.183Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3043","url":"https://osv.dev/vulnerability/PYSEC-2026-3043","licence":"CC-BY-4.0","modified":"2026-09-10T17:25:50.009Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3972","url":"https://osv.dev/vulnerability/PYSEC-2026-3972","licence":"CC-BY-4.0","modified":"2026-09-10T17:25:50.009Z"}],"updatedAt":"2026-11-25T22:59:21.367Z","epss":{"score":0.00327,"percentile":0.27878,"date":"2026-12-01T12:00:22.000Z"}}