{"id":"CVE-2026-58659","title":"PyTorch Lightning through 2.6.5, fixed in commit d710d68, contains a remote code execution vulnerability in the _load_state function that imports and executes attacker-controlled module names from checkpoint _instantiator hyperparameters…","summary":"PyTorch Lightning through 2.6.5, fixed in commit d710d68, contains a remote code execution vulnerability in the _load_state function that imports and executes attacker-controlled module names from checkpoint _instantiator hyperparameters…","severity":"high","cvss":7.8,"cvssVector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","cwe":["CWE-470","CWE-502"],"published":"2026-07-15","updated":"2026-07-18","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-58659","references":[{"url":"https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86f","label":"disclosure@vulncheck.com"},{"url":"https://github.com/Lightning-AI/pytorch-lightning/issues/21822","label":"disclosure@vulncheck.com"},{"url":"https://github.com/Lightning-AI/pytorch-lightning/pull/21832","label":"disclosure@vulncheck.com"},{"url":"https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter","label":"disclosure@vulncheck.com"},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-58659.json"},{"url":"https://access.redhat.com/security/cve/CVE-2026-58659"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2501037"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-58659"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58659"},{"url":"https://github.com/Lightning-AI/pytorch-lightning/releases/tag/2.6.6"},{"url":"https://github.com/advisories/GHSA-qqmf-gpg7-g8gw"},{"url":"https://github.com/Lightning-AI/pytorch-lightning"},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/lightning/PYSEC-2026-3624.yaml"},{"url":"https://access.redhat.com/errata/RHSA-2026:68699"},{"url":"https://access.redhat.com/errata/RHSA-2026:68698"},{"url":"https://access.redhat.com/errata/RHSA-2026:69466"},{"url":"https://access.redhat.com/errata/RHSA-2026:69467"}],"tags":["nvd","csaf","vex","red-hat","osv","pip"],"epss":0.00326,"epssPercentile":0.25822,"ingestedAt":"2026-07-18T14:23:38.231Z","vendor":"Red Hat","product":"Red Hat AI Inference Server","affected":["ai_inference_server","enterprise_linux_ai_rhel_ai 3","openshift_ai_rhoai"],"aliases":["PYSEC-2026-3967","GHSA-qqmf-gpg7-g8gw","PYSEC-2026-3624"],"ecosystem":"pip","patched":["pytorch-lightning 2.6.6"],"slug":"CVE-2026-58659","body":"## Overview\n\nPyTorch Lightning through 2.6.5, fixed in commit d710d68, contains a remote code execution vulnerability in the _load_state function that imports and executes attacker-controlled module names from checkpoint _instantiator hyperparameters. Attackers can craft malicious checkpoint files that bypass weights_only=True protections to execute arbitrary code when LightningModule.load_from_checkpoint is called.\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.\n\n## Vendor advisories\n\n- **Red Hat VEX** · Important · affected: Red Hat AI Inference Server, Red Hat Enterprise Linux AI (RHEL AI) 3, Red Hat OpenShift AI (RHOAI) · no fix planned: Red Hat AI Inference Server, Red Hat Enterprise Linux AI (RHEL AI) 3, Red Hat OpenShift AI (RHOAI) · updated 2026-09-21 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-58659.json)\n- **RHSA-2026:68699** · Red Hat · fixed in: Red Hat AI Inference Server 3.3 · released 2026-09-17 · [advisory](https://access.redhat.com/errata/RHSA-2026:68699)\n- **RHSA-2026:68698** · Red Hat · fixed in: Red Hat AI Inference Server 3.3 · released 2026-09-17 · [advisory](https://access.redhat.com/errata/RHSA-2026:68698)\n- **RHSA-2026:69466** · Red Hat · fixed in: Red Hat AI Inference Server 3.4 · released 2026-09-21 · [advisory](https://access.redhat.com/errata/RHSA-2026:69466)\n- **RHSA-2026:69467** · Red Hat · fixed in: Red Hat AI Inference Server 3.4 · released 2026-09-21 · [advisory](https://access.redhat.com/errata/RHSA-2026:69467)\n\n## Package advisory (CVE-2026-58659)\n\nAffected packages:\n\n- `pytorch-lightning < 2.6.6`\n\nPatched in:\n\n- `pytorch-lightning 2.6.6`\n\nSource: https://osv.dev/vulnerability/PYSEC-2026-3967","depth":"twilight","depthScore":43,"depthScoreParts":{"impact":42.9,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}