{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "2.6.5"
              }
            ],
            "source": [
              "DESCRIPTION",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "be98784a1a03581b7051a355ae1084fd352d7cea"
            },
            {
              "fixed": "d710d689510d50e800f53b3cd773cbca20b1f86f"
            }
          ],
          "repo": "https://github.com/lightning-ai/pytorch-lightning",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-470"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58659.json"
  },
  "details": "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. Attackers can craft malicious checkpoint files that bypass weights_only=True protections to execute arbitrary code when LightningModule.load_from_checkpoint is called.",
  "id": "CVE-2026-58659",
  "modified": "2026-07-19T03:31:13.293736586Z",
  "published": "2026-07-15T17:02:40.640Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58659.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-58659"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/pytorch-lightning-arbitrary-code-execution-via-instantiator-hyperparameter"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/Lightning-AI/pytorch-lightning/pull/21832"
    },
    {
      "type": "FIX",
      "url": "https://github.com/Lightning-AI/pytorch-lightning/commit/d710d689510d50e800f53b3cd773cbca20b1f86f"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/Lightning-AI/pytorch-lightning"
    },
    {
      "type": "EVIDENCE",
      "url": "https://github.com/Lightning-AI/pytorch-lightning/issues/21822"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter"
}