Full Breakdown
Dual Supply Chain Attacks Disrupt PHP and GitHub Ecosystems
5/25/2026, 12:55:23 PM
Technical Overview and Scale
The Packagist hook pulls a binary from github.com/parikhpreyash4/systemd-network-helper-aa5c751f, writes it to /tmp/.sshd, makes it executable and runs it silently; the code appears in 777 GitHub files. Megalodon’s workflows, in SysDiag (push/PR) and Optimize-Build (manual) variants, harvest CI variables, cloud keys (AWS, GCP, Azure), SSH keys, Docker/Kubernetes configs, Vault/Terraform tokens, API keys, JWTs, .env and other token files, then send them to 216.126.225.129:8443. Roughly 33 % of compromised usernames matched infostealer logs. The campaign also published malicious npm packages (polymarket-trading-cli, polymarket-terminal, polymarket-bot) with post-install hooks.
Implications for Open-Source Projects
The Packagist attack demonstrates that PHP projects using JavaScript build tools can be compromised without altering composer metadata, enabling remote code execution at install time. Megalodon’s credential harvest threatens the confidentiality of code and cloud infrastructure, affecting projects such as Tiledesk, Black-Iron-Project, WISE-Community and impersonated Polymarket npm tools.
Official Statements & Responses
Socket warned the Packagist installer enables remote code execution, disables TLS verification and runs a background binary, urging removal of the infected packages. Hudson Rock linked Megalodon to TeamPCP and noted stolen developer credentials as the entry point. SafeDep published a CSV of compromised GitHub repositories; both firms advised credential rotation and stricter CI/CD controls.
Criticism & Community Recommendations
Analysts criticize the focus on composer.json alone, noting that package.json post-install hooks can deliver binaries. The Megalodon breach underscores weak CI/CD permissions and token management, prompting calls for mandatory secret scanning, least-privilege GitHub tokens and enforced MFA for developers.
Conflicting Reports & Gaps
The Packagist binary’s behavior is unknown after the hosting GitHub account was removed, and analysts cannot determine how many of the 777 files are unique compromises. For Megalodon, the total amount of exfiltrated data beyond the listed secret types is unquantified, and the persistence of the injected workflows after cleanup remains unclear.
Verbatim Quotes
- "Although the affected packages were all Composer packages, the malicious code was not added to composer.json." — Socket, Application Security Firm
- "Instead, it was inserted into package.json, targeting projects that ship JavaScript build tooling alongside PHP code." — Socket
- "Even without the second-stage binary, the malicious installer is enough to warrant blocking." — Socket
- "It provides remote code execution during installation or build workflows and attempts to hide its activity by disabling TLS verification, suppressing errors, and running a downloaded binary in the background." — Socket
What's Next
Organizations should remove the compromised Packagist versions, rotate exposed credentials, consult SafeDep’s CSV for additional affected repositories, and apply stricter CI/CD controls to prevent future workflow injection.
