Application Security

Over 5,500 GitHub Repositories Infected in ‘Megalodon’ Supply Chain Attack

Fake automated commits injected GitHub Actions workflows containing payloads to steal credentials, CI secrets, keys, and tokens.

GitHub vulnerability

More than 5,500 GitHub repositories were infected with malware in a supply chain attack that relies on automated commits, security researchers warn.

The campaign, dubbed Megalodon, relies on GitHub Actions workflows containing a payload designed to steal credentials, keys, tokens, and other secrets.

The workflows, SafeDep says, were injected through over 5,700 malicious commits pushed to the impacted repositories within a six-hour window, on May 18.

According to the cybersecurity firm, the attackers deployed two payloads as part of the attack. One was designed to add a new workflow that would be triggered on every push and pull request, and another that replaced existing workflows with specific triggers, creating dormant backdoors.

On infected machines, the malware would exfiltrate all CI environment variables, AWS credentials, GCP access tokens, Azure credentials, SSH private keys, Docker and Kubernetes configurations, API keys, database connection strings, GitHub Actions tokens, GitLab CI/CD tokens, and dozens of other types of secrets.

Megalodon, SafeDep explains, was discovered after malicious versions of the Tiledesk package, an open source live chat and chatbot platform, were identified. The infected packages were published between May 19 and May 21.

Advertisement. Scroll to continue reading.

“The same NPM account, eljohnny (giovanni@tiledesk.com), published both the clean 2.18.5 and the compromised versions. The attacker never touched the NPM account. They compromised the GitHub repository, and the maintainer published from the poisoned source without realizing it,” SafeDep says.

The malicious commit that led to the infection was pushed on May 18, authored by ‘build-bot’. SafeDep’s investigation into the associated email address uncovered a total of 2,878 commits made on the same day, along with an additional 2,841 commits made via a second email address.

“All 5,718 commits landed on the same day: May 18, 2026, across a six-hour window from approximately 11:36 to 17:48 UTC, targeting 5,561 distinct repositories,” SafeDep explains.

The cybersecurity firm also notes that the attackers’ choice of malicious GitHub Actions workflow, namely ‘workflow_dispatch’, ensured that the dormant backdoor could be triggered at a later date via the GitHub API, using stolen GitHub tokens.

The workflow is exempted from GitHub’s anti-recursion rules, which prevent new workflow runs from being spawned via GitHub token-triggered events.

Last week, NPM announced that all NPM granular access tokens with write access that bypass two-factor authentication have been invalidated to prevent supply chain attacks similar to Mini Shai-Hulud.

According to Ox Security, this should prevent account hijacking, but does not resolve the underlying problem, and malicious code will continue to spread through compromised repositories.

“If platforms continue allowing any type of code to be uploaded without serious vetting, the number of attacks will only increase,” Ox notes.

“We’ve entered a new supply chain attack era, and TeamPCP compromising GitHub was only the beginning. What’s coming next is an endless wave, a tsunami of cyber attacks on developers worldwide,” the cybersecurity firm says.

Related: Grafana Says Codebase and Other Data Stolen via TanStack Supply Chain Attack

Related: Supply Chain Security Crisis: Too Many Vulnerabilities, Too Little Visibility

Related: Over 320 NPM Packages Hit by Fresh Mini Shai-Hulud Supply Chain Attack

Related: OpenAI Hit by TanStack Supply Chain Attack

Related Content

Malware & Threats

Hackers pushed a poisoned arrayref version that added a dependency to fetch a malicious payload from a remote server.

Supply Chain Security

Over 95% of the affected companies were exposed before the malicious LiteLLM packages were published.

Supply Chain Security

LiteLLM was compromised through the Trivy hack and abused to distribute information-stealing malware to its users.

Malware & Threats

The malware was designed to steal and exfiltrate secrets, and to propagate itself via stolen NPM and GitHub credentials.

Application Security

Dependabot gets a three-day cooldown window before opening pull requests, and PyPI rejects file uploads to releases older than 14 days.

Malware & Threats

A threat actor poisoned several Jscrambler NPM package versions to drop a cross-platform credential stealer.

Malware & Threats

Multiple campaigns are using ghost accounts to map GitHub organizations, including their repositories and members.

Malware & Threats

A Go module is used to load PowerShell code that fetches a resolver from public dead drops to execute Windows malware.

Copyright © 2026 SecurityWeek ®, a Wired Business Media Publication. All Rights Reserved.

Exit mobile version