{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-31221","id":"CVE-2026-31221","title":"PyTorch Lightning load_from_checkpoint has an insecure checkpoint deserialization","description":"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 arbi","descriptionLong":"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.","published":"2026-05-12T00:00:00.000Z","updated":"2026-11-10T02:30:37.474826413Z","reserved":"2026-03-09T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"mitre","metric":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},"metrics":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"CISA-ADP"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":[],"affectedProducts":[{"vendor":"n/a","product":"n/a","defaultStatus":null,"versions":[{"version":"n/a","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"pytorch-lightning","purl":"pkg:pypi/pytorch-lightning","ranges":["<=2.6.0"],"fixed":[],"advisory":"GHSA-75m9-98v2-hjpm"},{"ecosystem":"PyPI","name":"lightning","purl":"pkg:pypi/lightning","ranges":["<=2.6.0"],"fixed":[],"advisory":"PYSEC-2026-3972"}],"cwes":["CWE-502"],"aliases":["GHSA-75m9-98v2-hjpm","PYSEC-2026-3043","PYSEC-2026-3972"],"references":[{"url":"https://github.com/Lightning-AI/pytorch-lightning","tags":["Product","package"]},{"url":"https://www.notion.so/CVE-2026-31221-35d1e1393188815f8db7c4fd08076639","tags":["Exploit","Third Party Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31221.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31221","tags":["advisory"]},{"url":"https://pypi.org/project/pytorch-lightning","tags":["package"]},{"url":"https://github.com/advisories/GHSA-75m9-98v2-hjpm","tags":["advisory"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00385,"epssPercentile":0.33439,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-31221","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31221","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-31221","ok":true,"note":"2 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-75m9-98v2-hjpm","ok":true,"note":"GHSA-75m9-98v2-hjpm"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-31221","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}