Pin lightning==2.6.1 to avoid compromised 2.6.2/2.6.3#230
Merged
imbgar-roboflow merged 1 commit intoMay 1, 2026
Merged
Conversation
Lightning AI advisory GHSA-w37p-236h-pfx3 reports the lightning / pytorch-lightning 2.6.2 and 2.6.3 wheels on PyPI contain a credential-harvesting payload that auto-executes on import. 2.6.1 is the last known clean release. The previous spec 'lightning>=2.4.0' would resolve to 2.6.3 on a fresh install. Pinning to 2.6.1 forces resolvers to skip the malicious versions until upstream publishes a clean replacement. Refs: GHSA-w37p-236h-pfx3
yeldarby
approved these changes
May 1, 2026
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.
Summary
lightningto==2.6.1(was>=2.4.0) so a fresh install does not resolve to the malicious wheels on PyPI.Why
Lightning AI advisory GHSA-w37p-236h-pfx3 (published 2026-04-30) confirms that
lightning/pytorch-lightning2.6.2 and 2.6.3 on PyPI were compromised. The wheels include a hidden_runtime/directory with astart.pydownloader and an ~11 MB obfuscatedrouter_runtime.jspayload that auto-executes onimport lightning, harvests credentials (GitHub/npm/PyPI tokens, cloud creds, env vars, SSH keys), and attempts to commit encoded data back to victim repos. See Socket's writeup: https://socket.dev/blog/lightning-pypi-package-compromised.2.6.1(published 2026-01-30) is the last known clean release. The current speclightning>=2.4.0is unbounded and would resolve to2.6.3on a fresh install — this PR forces resolvers to skip the malicious versions until upstream ships a clean replacement.Notes
>=range again.uv lock/poetry lockregeneration is needed — thepyproject.tomlchange is sufficient.Test plan
pip install -e .still resolves successfully