Obfuscated Credential Stealer Found in Compromised PyPI lightning Releases

· Original article ↗

Summary

StepSecurity reports that lightning 2.6.2 and 2.6.3 contain an import-triggered, obfuscated JavaScript payload that steals credentials, abuses GitHub to exfiltrate data, and infects npm tarballs. Full payload analysis is ongoing.

Key points

  • StepSecurity identified malicious code in lightning PyPI versions 2.6.2 and 2.6.3; it identifies 2.6.1, published January 30, 2026, as the last clean release.
  • On import, a daemon thread silently downloads the Bun JavaScript runtime and runs an 11 MB obfuscated payload from a hidden _runtime directory.
  • Static analysis indicates the payload targets tokens, API keys, environment variables, authentication material, and cloud secrets.
  • The payload uses victims’ GitHub credentials to commit encoded stolen data to repositories.
  • The malware also injects code into npm package tarballs on the developer’s machine, potentially spreading to downstream consumers.
  • The article reports signs of compromise in the project’s GitHub account; a token-based takeover is presented as a likely explanation, not a confirmed finding.
  • StepSecurity says Harden-Runner can flag suspicious process access to GitHub Actions runner memory; full payload analysis remains ongoing.

Article Details

Attack Vectors
  • Compromised PyPI releases lightning 2.6.2 and 2.6.3 bundle a hidden _runtime directory; importing the package starts a silent daemon thread.
  • The package downloads the Bun JavaScript runtime from GitHub and uses it to execute the heavily obfuscated router_runtime.js payload.
  • The payload steals credentials, tokens, environment variables, and cloud secrets, then commits encoded stolen data to repositories through the GitHub API using the victim’s credentials.
  • The payload injects malicious code into npm package tarballs on the developer’s machine, potentially spreading to downstream consumers.
  • The article describes attacks in this family using a Python child process to scan /proc and read /proc/{pid}/mem from a GitHub Actions Runner.Worker process to extract secrets.
Defensive Notes
  • The article identifies lightning 2.6.1 as the last clean release; versions 2.6.2 and 2.6.3 are compromised.
  • StepSecurity says Harden-Runner’s process monitor can flag unauthorized process-memory access as a suspicious process event.
  • The article notes that static analysis of the Python wheel alone cannot reveal the full capabilities of the obfuscated JavaScript payload fetched at runtime.

MITRE ATT&CK

Vendors

Products

Tools

Related Articles