pypi package report

Is lightning safe?

Versions 2.6.2 and 2.6.3 of lightning were compromised (infostealer). Other versions are not flagged as malicious.

Do not install lightning 2.6.2 or 2.6.3

CRITICAL

Infostealer. Added to CyberXYZ 2026-04-30, OSV malicious-package feed (Google / OpenSSF).

// what we observed

Versions 2.6.2, 2.6.3 were compromised. Compromised versions contain injected code that starts automatically during importing the module, downloads (legitimate) JavaScript runtime, and executes included JavaScript infostealer. It collects credentials from multiple sources (e.g. files, process memory, cloud metadata endpoints, CLI commands like gh or gcloud), sensitive cryptocurrency data, shell history files. It also attempts to spread itself using discovered credentials to other repositories and packages. Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers. Campaign: 2026-04-compr-lightning Reasons (based on the campaign): • infostealer • files-exfiltration • exfiltration-ssh-keys • exfiltration-crypto • exfiltration-credentials • compromised-package

Reported by kam193 via OSV.

// versions and what to do
Malicious
2.6.2, 2.6.3
Move to
2.6.6 newest 2.x release, no known advisory

If one of these versions was installed, remove it and treat the credentials, tokens and SSH keys on that machine as exposed: rotate them. Check CI runners and container images that installed it too.

pip install "lightning==2.6.6"

OSV recordissuereferencereferencereferenceadvisory

// our research
// reach

43 direct dependencies

16 carry known advisories, worst CRITICAL

35 packages depend on it

an advisory here reaches each of them

Create a free accountfor every dependency path, dependent and what to upgrade
// ai model usage

No published models are known to use this package.


cvss
9.1
critical

CVSS v3.0 base score out of 10

epss
1.3%
medium

chance of exploitation in 30 days, 71st percentile of all CVEs

xyz score
4.9
medium

CyberXYZ composite out of 10

fig. 01 — GHSA-mr7h-w2qc-ffc2, the advisory selected below

// 3 advisories

GHSA-mr7h-w2qc-ffc2

CRITICALGitHub ratingCVE-2024-5980

A vulnerability in the /v1/runs API endpoint of lightning-ai/pytorch-lightning v2.2.4 allows attackers to exploit path traversal when extracting tar.gz files. When the LightningApp is running with the plugin_server, attackers can deploy malicious tar.gz plugins that embed arbitrary files with path traversal vulnerabilities. This can result in arbitrary files being written to any directory in the victim's local file system, potentially leading to remote code execution.

// cvss v3.0 vector

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

Checked 2026-11-06 at 17:24 UTC. The most recent advisory here was published 2026-07-15. Updated continuously from NVD, GHSA, OSV and CNA feeds.

Think a verdict here is wrong? Tell us — we respond within 2 business days.