Skip to content

Update dependency pytorch-lightning to v2.6.6 [SECURITY] - #51

Closed
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/pypi-pytorch-lightning-vulnerability
Closed

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/pypi-pytorch-lightning-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
pytorch-lightning ==2.5.2 → ==2.6.6 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


PyTorch Lightning load_from_checkpoint has an insecure checkpoint deserialization

CVE-2026-31221 / GHSA-75m9-98v2-hjpm / PYSEC-2026-3043 / PYSEC-2026-3972

More information

Details

PyTorch-Lightning versions 2.6.0 and earlier contain an insecure deserialization vulnerability (CWE-502) in the checkpoint loading mechanism. The LightningModule.load_from_checkpoint() method, which is commonly used to load saved model states, internally calls torch.load() without setting the security-restrictive weights_only=True parameter. This default behavior allows the deserialization of arbitrary Python objects via the Pickle module. A remote attacker can exploit this by providing a maliciously crafted checkpoint file, leading to arbitrary code execution on the victim's system when the file is loaded.

Severity

  • CVSS Score: 7.8 / 10 (High)
  • Vector String: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


PyTorch Lightning load_from_checkpoint has an insecure checkpoint deserialization

CVE-2026-31221 / GHSA-75m9-98v2-hjpm / PYSEC-2026-3043 / PYSEC-2026-3972

More information

Details

PyTorch-Lightning versions 2.6.0 and earlier contain an insecure deserialization vulnerability (CWE-502) in the checkpoint loading mechanism. The LightningModule.load_from_checkpoint() method, which is commonly used to load saved model states, internally calls torch.load() without setting the security-restrictive weights_only=True parameter. This default behavior allows the deserialization of arbitrary Python objects via the Pickle module. A remote attacker can exploit this by providing a maliciously crafted checkpoint file, leading to arbitrary code execution on the victim's system when the file is loaded.

Severity

  • CVSS Score: 7.8 / 10 (High)
  • Vector String: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

References

This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).


CVE-2026-58659 / GHSA-qqmf-gpg7-g8gw / PYSEC-2026-3624 / PYSEC-2026-3967

More information

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.

Severity

  • CVSS Score: 8.4 / 10 (High)
  • Vector String: 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

References

This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).


Release Notes

Lightning-AI/lightning (pytorch-lightning)

v2.6.6: Lightning 2.6.6

Compare Source

Changes in 2.6.6

PyTorch Lightning
Fixed
  • Fixed arbitrary code execution in load_from_checkpoint by restricting the _instantiator hyperparameter to an allowlist of trusted instantiators (#​21832)

  • Fixed arbitrary code execution in load_from_checkpoint by rejecting a checkpoint _class_path that does not resolve to an already imported subclass of the loaded class (#​21914)


Full commit list: 2.6.5 -> 2.6.6

Contributors

We thank all folks who submitted issues, features, fixes and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

In particular, we would like to thank the authors and co-authors of the pull-requests above:

@​addyCooks @​bhimrazy

v2.6.5: Lightning 2.6.5

Compare Source

Changes in 2.6.5

Lightning Fabric
Changed
  • Use fs.pipe() for S3/GCS checkpoint uploads in _atomic_save (#​21595


Full commit list: 2.6.4 -> 2.6.5

Contributors

New Contributors

We thank all folks who submitted issues, features, fixes and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

In particular, we would like to thank the authors and co-authors of the pull-requests above:

@​c-pozzi @​justusschock

v2.6.4: Lightning 2.6.4

Compare Source

Changes in 2.6.4

PyTorch Lightning
Removed
  • Removed support for Neptune logger (#​21572).

Note: We usually don't remove features in a patch release, however in this case it's an exception since even without removing it the integration would be broken due to Neptune being acquired and sunsetting public service

Changed
  • Raised minimum LitLogger version to 2026-03-17 (#​21591)

Fixed
  • Fixed val_check_interval raising ValueError when limit_val_batches=0 and interval exceeds training batches (#​21560)

  • Fixed FSDP mixed precision (bf16-mixed, 16-mixed) initializing model parameters in half precision instead of fp32 (#​21586)

  • Fixed device_mesh type hint in FSDPStrategy to accept a 2-element tuple via the CLI (#​21581)

  • Fixed RichModelSummary model size display formatting (#​21467)

  • Fixed floating-point precision in SimpleProfiler duration aggregation by using math.fsum (#​21525)

  • Lightning Fabric
    Fixed
    • Fixed FSDP mixed precision (bf16-mixed, 16-mixed) initializing model parameters in half precision instead of fp32 (#​21586)

    • Fixed device_mesh type hint in FSDPStrategy to accept a 2-element tuple via the CLI (#​21581)


    Full commit list: 2.6.1 -> 2.6.4

    Contributors

    New Contributors

    We thank all folks who submitted issues, features, fixes and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

    In particular, we would like to thank the authors and co-authors of the pull-requests above:

    @​AsherJingkongChen, @​Borda, @​bhimrazy, @​deependujha, @​justusschock, @​littlebullGit, @​ManasVardhan, @​taha-yassine

    v2.6.1: Lightning v2.6.1

    Compare Source

    Changes in 2.6.1

    PyTorch Lightning
    Added
    • Added method chaining support to LightningModule.freeze() and LightningModule.unfreeze() by returning self (#​21469)
    • Added litlogger integration(#​21430)
    Deprecated
    • Deprecated to_torchscript method due to deprecation of TorchScript in PyTorch (#​21397)
    Removed
    • Removed support for Python 3.9 due to end-of-life status (#​21398)
    Fixed
    • Fixed save_hyperparameters(ignore=...) behavior so subclass ignore rules override base class rules (#21490)
    • Fixed LightningDataModule.load_from_checkpoint to restore the datamodule subclass and hyperparameters (#​21478)
    • Fixed ModelParallelStrategy single-file checkpointing when torch.compile wraps the model so optimizer states no longer raise KeyError during save (#​21357)
    • Sanitize profiler filenames when saving to avoid crashes due to invalid characters (#​21395)
    • Fixed StochasticWeightAveraging with infinite epochs (#​21396)
    • Fixed _generate_seed_sequence_sampling function not producing unique seeds (#​21399)
    • Fixed ThroughputMonitor callback emitting warnings too frequently (#​21453)
    Lightning Fabric
    Added
    • Exposed weights_only argument for loading checkpoints in Fabric.load() and Fabric.load_raw() (#​21470)
    Fixed
    • Fixed DistributedSamplerWrapper not forwarding set_epoch to the underlying sampler (#​21454)
    • Fixed DDP notebook CUDA fork check to allow passive initialization when CUDA is not actively used (#​21402)

    Full commit list: 2.6.0 -> 2.6.1

    Contributors

    New Contributors

    We thank all folks who submitted issues, features, fixes and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

    In particular, we would like to thank the authors of the pull-requests above

    v2.6.0: Lightning v2.6.0

    Compare Source

    Changes in 2.6.0

    PyTorch Lightning
    Added
    • Added WeightAveraging callback that wraps the PyTorch AveragedModel class (#​20545)
    • Added Torch-Tensorrt integration with LightningModule (#​20808)
    • Added time-based validation support though val_check_interval (#​21071)
    • Added attributes to access stopping reason in EarlyStopping callback (#​21188)
    • Added support for variable batch size in ThroughputMonitor (#​20236)
    • Added EMAWeightAveraging callback that wraps Lightning's WeightAveraging class (#​21260)
    Changed
    • Expose weights_only argument for Trainer.{fit,validate,test,predict} and let torch handle default value (#​21072)
    • Default to RichProgressBar and RichModelSummary if the rich package is available. Fallback to TQDMProgressBar and ModelSummary otherwise (#​20896)
    • Add MPS accelerator support for mixed precision (#​21209)
    Fixed
    • Fixed edgecase when max_trials is reached in Tuner.scale_batch_size (#​21187)
    • Fixed case where LightningCLI could not be initialized with trainer_default containing callbacks (#​21192)
    • Fixed missing reset when ModelPruning is applied with lottery ticket hypothesis (#​21191)
    • Fixed preventing recursive symlink creation iwhen save_last='link' and save_top_k=-1 (#​21186)
    • Fixed last.ckpt being created and not linked to another checkpoint (#​21244)
    • Fixed bug that prevented BackboneFinetuning from being used together with LearningRateFinder (#​21224)
    • Fixed ModelPruning sparsity logging bug that caused incorrect sparsity percentages (#​21223)
    • Fixed LightningCLI loading of hyperparameters from ckpt_path failing for subclass model mode (#​21246)
    • Fixed check the init args only when the given frames are in __init__ method (#​21227)
    • Fixed how ThroughputMonitor calculated training time (#​21291)
    • Fixed synchronization of gradients in manual optimization with DDPStrategy(static_graph=True) (#​21251)
    • Fixed FSDP mixed precision semantics and added user warning (#​21361)
    Lightning Fabric
    Changed
    • Expose weights_only argument for Trainer.{fit,validate,test,predict} and let torch handle default value (#​21072)
    • Set _DeviceDtypeModuleMixin._device from torch's default device function (#​21164)
    • Added kwargs-filtering for Fabric.call to support different callback method signatures (#​21258)
    Fixed
    • Fixed issue in detecting MPIEnvironment with partial mpi4py installation (#​21353)
    • Learning rate scheduler is stepped at the end of epoch when on_train_batch_start returns -1 (#​21296).
    • Fixed FSDP mixed precision semantics and added user warning (#​21361)

    Full commit list: 2.5.0 -> 2.6.0

    Contributors

    We thank all folks who submitted issues, features, fixes and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

    In particular, we would like to thank the authors of the pull-requests above

    v2.5.6: Lightning v2.5.6

    Compare Source

    Changes in 2.5.6

    PyTorch Lightning
    Changed
    • Add name() function to accelerator interface ((#​21325))
    Removed
    • Remove support for deprecated and archived lightning-habana package (#​21327)

    v2.5.5: Lightning v2.5.5

    Compare Source

    Changes in 2.5.5

    PyTorch Lightning
    Changed
    • Include exclude_frozen_parameters to DeepSpeedStrategy (#​21060)
    • Include PossibleUserWarning that is raised if modules are in eval mode when training starts (#​21146)
    Fixed
    • Fixed LightningCLI not using ckpt_path hyperparameters to instantiate classes (#​21116)
    • Fixed callbacks by defer step/time-triggered ModelCheckpoint saves until validation metrics are available (#​21106)
    • Fixed with adding a missing device id for pytorch 2.8 (#​21105)
    • Fixed TQDMProgressBar not resetting correctly when using both a finite and iterable dataloader (#​21147)
    • Fixed cleanup of temporary files from Tuner on crashes (#​21162)

    Lightning Fabric
    Changed
    • Include exclude_frozen_parameters to DeepSpeedStrategy (#​21060)
    • Let _get_default_process_group_backend_for_device support more hardware platforms (
      #​21057, #​21093)
    Fixed
    • Fixed with adding a missing device id for pytorch 2.8 (#​21105)
    • Respecting verbose=False in seed_everything when no seed is provided (#​21161)

    Full commit list: 2.5.4 -> 2.5.5

    Contributors

    We thank all folks who submitted issues, features, fixes and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

    In particular, we would like to thank the authors of the pull-requests above, in no particular order:

    @​Borda, @​KAVYANSHTYAGI, @​littlebullGit, @​mauvilsa, @​SkafteNicki, @​taozhiwei

    Thank you ❤️ and we hope you'll keep them coming!

    v2.5.4: Lightning v2.5.4

    Compare Source

    Changes in 2.5.4

    PyTorch Lightning
    Fixed
    • Fixed AsyncCheckpointIO snapshots tensors to avoid race with parameter mutation (#​21079)
    • Fixed AsyncCheckpointIO threadpool exception if calling fit or validate more than one (#​20952)
    • Fixed learning rate not being correctly set after using LearningRateFinder callback (#​21068)
    • Fixed misalignment column while using rich model summary in DeepSpeedstrategy (#​21100)
    • Fixed RichProgressBar crashing when sanity checking using val dataloader with 0 len (#​21108)

    Lightning Fabric
    Changed
    • Added support for NVIDIA H200 GPUs in get_available_flops (#​20913)

    Full commit list: 2.5.3 -> 2.5.4

    Contributors

    We thank all folks who submitted issues, features, fixes and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

    In particular, we would like to thank the authors of the pull-requests above, in no particular order:

    @​fnhirwa, @​GdoongMathew, @​jjh42, @​littlebullGit, @​SkafteNicki

    Thank you ❤️ and we hope you'll keep them coming!

    v2.5.3: Lightning v2.5.3

    Compare Source

    Notable changes in this release

    PyTorch Lightning
    Changed
    • Added save_on_exception option to ModelCheckpoint Callback (#​20916)
    • Allow dataloader_idx_ in log names when add_dataloader_idx=False (#​20987)
    • Allow returning ONNXProgram when calling to_onnx(dynamo=True) (#​20811)
    • Extended support for general mappings being returned from training_step when using manual optimization (#​21011)
    Fixed
    • Fixed Allowing trainer to accept CUDAAccelerator instance as accelerator with FSDP strategy (#​20964)
    • Fixed progress bar console clearing for Rich 14.1+ (#​21016)
    • Fixed AdvancedProfiler to handle nested profiling actions for Python 3.12+ (#​20809)
    • Fixed rich progress bar error when resume training (#​21000)
    • Fixed double iteration bug when resumed from a checkpoint. (#​20775)
    • Fixed support for more dtypes in ModelSummary (#​21034)
    • Fixed metrics in RichProgressBar being updated according to user provided refresh_rate (#​21032)
    • Fixed save_last behavior in the absence of validation (#​20960)
    • Fixed integration between LearningRateFinder and EarlyStopping (#​21056)
    • Fixed gradient calculation in lr_finder for mode="exponential" (#​21055)
    • Fixed save_hyperparameters crashing with dataclasses using init=False fields (#​21051)

    Lightning Fabric
    Changed
    • Enable "auto" for devices and accelerator as CLI arguments (#​20913)
    • Raise ValueError when seed is out-of-bounds or cannot be cast to int (#​21029)
    Fixed
    • Fixed remove extra name parameter in accelerator registry decorator (#​20975)
    • Fixed XLA strategy to add support for global_ordinal, local_ordinal, world_size which came instead of deprecated methods (#​20852)

    Full commit list: 2.5.2 -> 2.5.3

    Contributors

    We thank all folks who submitted issues, features, fixes and doc changes. It's the only way we can collectively make Lightning ⚡ better for everyone, nice job!

    In particular, we would like to thank the authors of the pull-requests above, in no particular order:

    @​baskrahmer, @​bhimrazy, @​deependujha, @​fnhirwa, @​GdoongMathew, @​jonathanking, @​relativityhd, @​rittik9, @​SkafteNicki, @​sudiptob2, @​vsey, @​YgLK

    Thank you ❤️ and we hope you'll keep them coming!


    Configuration

    📅 Schedule: (UTC)

    • Branch creation
      • At any time (no schedule defined)
    • Automerge
      • At any time (no schedule defined)

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    ♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • If you want to rebase/retry this PR, check this box

    This PR was generated by Mend Renovate. View the repository job log.

    @soykilian soykilian closed this Nov 18, 2026
    @renovate
    renovate Bot deleted the renovate/pypi-pytorch-lightning-vulnerability branch November 18, 2026 17:39
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    None yet

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    1 participant