Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') Affecting pytorch-lightning package, versions [0,]


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.33% (26th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-PYTORCHLIGHTNING-18016331
  • published19 Jul 2026
  • disclosed15 Jul 2026
  • creditGeorge Chen

Introduced: 15 Jul 2026

NewCVE-2026-58659  (opens in a new tab)
CWE-470  (opens in a new tab)

How to fix?

A fix was pushed into the master branch but not yet published.

Overview

pytorch-lightning is a lightweight PyTorch wrapper for ML researchers. Scale your models. Write less boilerplate.

Affected versions of this package are vulnerable to Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') via the _load_state function that imports and executes module names specified in checkpoint _instantiator hyperparameters. An attacker can achieve arbitrary code execution by providing a malicious checkpoint file that is loaded through the load_from_checkpoint function.

CVSS Base Scores

version 4.0
version 3.1