Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍 PyPI
Not in CISA KEV

CVE-2026-58659 — lightning

Fix: Lightning-AI/pytorch-lightning@d710d68

CVE-2026-58659 is a CWE-470 vulnerability in lightning. A fix is available for lightning — see the affected versions and patch details below.

PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter

Also known asGHSA-qqmf-gpg7-g8gwPYSEC-2026-3624PYSEC-2026-3967
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 19, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-58659.

EPSS Exploitation Probability

via FIRST.org ↗
0.6%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs49th percentile — riskier than 49% of all scored CVEsHighest risk
0.00%0.38%0.75%1.13%0.2%0.3%0.6%0.6%Aug 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
🐍lightning

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIlightningall versions2.6.6pip install --upgrade 'lightning==2.6.6'

Affected Products

1 product · 1 configurations
Application
pytorch lightninglightningai
≤ 2.6.5
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for lightning, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update lightning to 2.6.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-58659 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

This is an Important severity flaw in PyTorch Lightning that could lead to remote code execution. The vulnerability arises from the _load_state function's ability to import and execute attacker-controlled module names from maliciously crafted checkpoint files, even when weights_only=True is enabled. Exploitation…

ProductFixed inAdvisory
Red Hat AI Inference Server 3.3rhaiis/vllm-rocm-rhel9:1789504371RHSA-2026:68698
Red Hat AI Inference Server 3.3rhaiis/vllm-cuda-rhel9:1789582776RHSA-2026:68699
Red Hat AI Inference Server 3.4rhaii/vllm-cpu-rhel9:1789681128RHSA-2026:69466
Red Hat AI Inference Server 3.4rhaii/vllm-cuda-rhel9:1789681126RHSA-2026:69467
Red Hat AI Inference Server 3.4rhaii/vllm-cpu-rhel9:1790075793RHSA-2026:70965
Red Hat AI Inference Server 3.4rhaii/vllm-cuda-rhel9:1790090131RHSA-2026:70979
Red Hat AI Inference Server 3.5rhaii/vllm-cuda-rhel9:1791473631RHSA-2026:82368
Red Hat AI Inference Server 3.5rhaii/vllm-cpu-rhel9:1791473614RHSA-2026:82415

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2026-58659 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2026-58659: lightning RCE — Fixed in 2.6.6