Repository navigation
Update dependency pytorch-lightning to v2.6.6 [SECURITY] - #51
Closed
renovate[bot] wants to merge 1 commit into
Closed
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
deleted the
renovate/pypi-pytorch-lightning-vulnerability
branch
November 18, 2026 17:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==2.5.2→==2.6.6Warning
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:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HReferences
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:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HReferences
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: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:XReferences
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.6Compare Source
Changes in
2.6.6PyTorch Lightning
Fixed
Fixed arbitrary code execution in
load_from_checkpointby restricting the_instantiatorhyperparameter to an allowlist of trusted instantiators (#21832)Fixed arbitrary code execution in
load_from_checkpointby rejecting a checkpoint_class_paththat 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.5Compare Source
Changes in
2.6.5Lightning 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.4Compare Source
Changes in
2.6.4PyTorch Lightning
Removed
Changed
Raised minimum
LitLoggerversion to2026-03-17(#21591)Fixed
Fixed
val_check_intervalraisingValueErrorwhenlimit_val_batches=0and 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_meshtype hint inFSDPStrategyto accept a 2-element tuple via the CLI (#21581)Fixed
RichModelSummarymodel size display formatting (#21467)Fixed floating-point precision in
SimpleProfilerduration aggregation by usingmath.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_meshtype hint inFSDPStrategyto 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.1Compare Source
Changes in
2.6.1PyTorch Lightning
Added
LightningModule.freeze()andLightningModule.unfreeze()by returningself(#21469)Deprecated
to_torchscriptmethod due to deprecation of TorchScript in PyTorch (#21397)Removed
Fixed
save_hyperparameters(ignore=...)behavior so subclass ignore rules override base class rules (#21490)LightningDataModule.load_from_checkpointto restore the datamodule subclass and hyperparameters (#21478)ModelParallelStrategysingle-file checkpointing whentorch.compilewraps the model so optimizer states no longer raiseKeyErrorduring save (#21357)StochasticWeightAveragingwith infinite epochs (#21396)_generate_seed_sequence_samplingfunction not producing unique seeds (#21399)ThroughputMonitorcallback emitting warnings too frequently (#21453)Lightning Fabric
Added
weights_onlyargument for loading checkpoints inFabric.load()andFabric.load_raw()(#21470)Fixed
DistributedSamplerWrappernot forwardingset_epochto the underlying sampler (#21454)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.0Compare Source
Changes in
2.6.0PyTorch Lightning
Added
WeightAveragingcallback that wraps the PyTorchAveragedModelclass (#20545)LightningModule(#20808)val_check_interval(#21071)EarlyStoppingcallback (#21188)ThroughputMonitor(#20236)EMAWeightAveragingcallback that wraps Lightning'sWeightAveragingclass (#21260)Changed
weights_onlyargument forTrainer.{fit,validate,test,predict}and lettorchhandle default value (#21072)RichProgressBarandRichModelSummaryif the rich package is available. Fallback to TQDMProgressBar and ModelSummary otherwise (#20896)Fixed
max_trialsis reached inTuner.scale_batch_size(#21187)LightningCLIcould not be initialized withtrainer_defaultcontaining callbacks (#21192)ModelPruningis applied with lottery ticket hypothesis (#21191)save_last='link'andsave_top_k=-1(#21186)last.ckptbeing created and not linked to another checkpoint (#21244)BackboneFinetuningfrom being used together withLearningRateFinder(#21224)ModelPruningsparsity logging bug that caused incorrect sparsity percentages (#21223)LightningCLIloading of hyperparameters fromckpt_pathfailing for subclass model mode (#21246)__init__method (#21227)ThroughputMonitorcalculated training time (#21291)DDPStrategy(static_graph=True)(#21251)Lightning Fabric
Changed
weights_onlyargument forTrainer.{fit,validate,test,predict}and lettorchhandle default value (#21072)_DeviceDtypeModuleMixin._devicefrom torch's default device function (#21164)Fabric.callto support different callback method signatures (#21258)Fixed
on_train_batch_startreturns -1 (#21296).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.6Compare Source
Changes in
2.5.6PyTorch Lightning
Changed
name()function to accelerator interface ((#21325))Removed
v2.5.5: Lightning v2.5.5Compare Source
Changes in
2.5.5PyTorch Lightning
Changed
exclude_frozen_parameterstoDeepSpeedStrategy(#21060)PossibleUserWarningthat is raised if modules are in eval mode when training starts (#21146)Fixed
LightningCLInot usingckpt_pathhyperparameters to instantiate classes (#21116)ModelCheckpointsaves until validation metrics are available (#21106)TQDMProgressBarnot resetting correctly when using both a finite and iterable dataloader (#21147)Tuneron crashes (#21162)Lightning Fabric
Changed
exclude_frozen_parameterstoDeepSpeedStrategy(#21060)_get_default_process_group_backend_for_devicesupport more hardware platforms (#21057, #21093)
Fixed
verbose=Falseinseed_everythingwhen 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.4Compare Source
Changes in
2.5.4PyTorch Lightning
Fixed
AsyncCheckpointIOsnapshots tensors to avoid race with parameter mutation (#21079)AsyncCheckpointIOthreadpool exception if calling fit or validate more than one (#20952)LearningRateFindercallback (#21068)DeepSpeedstrategy(#21100)RichProgressBarcrashing when sanity checking using val dataloader with 0 len (#21108)Lightning Fabric
Changed
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.3Compare Source
Notable changes in this release
PyTorch Lightning
Changed
save_on_exceptionoption toModelCheckpointCallback (#20916)dataloader_idx_in log names whenadd_dataloader_idx=False(#20987)ONNXProgramwhen callingto_onnx(dynamo=True)(#20811)training_stepwhen using manual optimization (#21011)Fixed
14.1+(#21016)AdvancedProfilerto handle nested profiling actions for Python 3.12+ (#20809)richprogress bar error when resume training (#21000)ModelSummary(#21034)RichProgressBarbeing updated according to user providedrefresh_rate(#21032)save_lastbehavior in the absence of validation (#20960)LearningRateFinderandEarlyStopping(#21056)lr_finderformode="exponential"(#21055)save_hyperparameterscrashing withdataclassesusinginit=Falsefields (#21051)Lightning Fabric
Changed
devicesandacceleratoras CLI arguments (#20913)out-of-boundsorcannot be cast to int(#21029)Fixed
nameparameter in accelerator registry decorator (#20975)global_ordinal,local_ordinal,world_sizewhich 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)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.