Arbitrary code execution via unchecked instantiator import
Published Jul 15, 2026 · Updated Jul 15, 2026
Unsafe reflection in Lightning AI PyTorch Lightning 2.6.5 and earlier allows attackers to execute arbitrary code from a crafted checkpoint. _load_state reads _instantiator from checkpoint hyperparameters, passes its module path to import, resolves the named attribute, and calls it without an allowlist. A user or application must pass the untrusted file to LightningModule.load_from_checkpoint; weights_only=True does not block the application-level import.
Summary
What happened
Unsafe reflection in Lightning AI PyTorch Lightning 2.6.5 and earlier allows attackers to execute arbitrary code from a crafted checkpoint. _load_state reads _instantiator from checkpoint hyperparameters, passes its module path to import, resolves the named attribute, and calls it without an allowlist. A user or application must pass the untrusted file to LightningModule.load_from_checkpoint; weights_only=True does not block the application-level import.
The record
- CVE
- CVE-2026-58659
- Published
- Jul 15, 2026
- Updated
- Jul 15, 2026
- Vendor
- Lightning AI
- Product
- PyTorch Lightning
- Classifications
- CWE-470, T1203
- Attack vector
- local
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jul 15, 2026CVE publishedPublication date reported by the CVE source.
- Jul 15, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0 <=2.6.5
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Checkpoint _instantiator proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo