ANAVEM
Reference
Languagefr
Computer screen showing Python code with security warning indicators in dark lighting

GlassWorm Malware Hijacks GitHub Tokens to Poison Python Repos

Attackers use stolen GitHub tokens to inject GlassWorm malware into hundreds of Python repositories targeting Django and ML projects.

Emanuel DE ALMEIDAEmanuel DE ALMEIDA
16 March 2026, 20:37 2 min read 12

Last updated 17 March 2026, 07:06

SEVERITYHigh
EXPLOITActive Exploit
PATCH STATUSUnavailable
VENDORGitHub
AFFECTEDPython repositories, Django ap...
CATEGORYMalware

Key Takeaways

GlassWorm Campaign Compromises Python Development Supply Chain

Security researchers at StepSecurity discovered an active malware campaign on March 16, 2026, where attackers exploit stolen GitHub authentication tokens to inject malicious code into Python repositories. The GlassWorm malware specifically targets popular Python frameworks and machine learning projects.

The attackers append obfuscated malicious code to critical Python files including setup.py, main.py, and app.py. This supply chain attack method allows the malware to execute whenever developers or users run the compromised code.

Python Developers and ML Researchers at Risk

The campaign primarily affects Python developers working with Django web applications, machine learning research projects, Streamlit dashboard applications, and PyPI package maintainers. Hundreds of repositories have been compromised, putting both individual developers and organizations at risk.

Any developer who downloads, clones, or executes code from the affected repositories could unknowingly run the GlassWorm malware on their systems.

Related: KadNap Malware Hijacks 14,000 Asus Routers for Botnet

Related: Chrome Extensions Turn Malicious After Ownership Transfer

Related: Malicious npm Package Mimics OpenClaw AI to Deploy RAT

Related: GitHub Accounts Breached in VS Code GlassWorm Aftermath

GitHub Token Theft Enables Repository Poisoning

The attackers gained unauthorized access to GitHub repositories by stealing authentication tokens, likely through credential theft or social engineering attacks. Once inside, they systematically modify Python files to include their malicious payload without alerting repository owners.

Developers should immediately audit their Python projects for unexpected code changes and review their GitHub token security. Organizations should monitor their repositories for unauthorized commits and implement CISA's security guidelines for supply chain protection.

Frequently Asked Questions

How does GlassWorm malware infect Python repositories?+
GlassWorm uses stolen GitHub authentication tokens to gain unauthorized access to Python repositories. The attackers then inject obfuscated malicious code into critical files like setup.py, main.py, and app.py.
Which Python projects are targeted by GlassWorm?+
The malware specifically targets Django web applications, machine learning research code, Streamlit dashboards, and PyPI packages. Hundreds of repositories across these categories have been compromised.
How can developers protect against GlassWorm supply chain attacks?+
Developers should audit their Python projects for unexpected code changes, review GitHub token security, and monitor repositories for unauthorized commits. Organizations should implement supply chain security guidelines and code review processes.
Emanuel DE ALMEIDA
About the Author

Emanuel DE ALMEIDA

Senior IT Journalist & Cloud Architect

Microsoft MCSA-certified Cloud Architect | Fortinet-focused. I modernize cloud, hybrid & on-prem infrastructure for reliability, security, performance and cost control - sharing field-tested ops & troubleshooting.

Discussion

Share your thoughts and insights

You must be logged in to comment.

Loading comments...