AI-Powered Malware Botches Own Theft After Leaking GitHub Token

A malicious npm package, allegedly coded by AI, inadvertently exposed its developer's private token, allowing security researchers to trace its malicious activity.

May 28, 2026
Hardware & Tech
AI-Powered Malware Botches Own Theft After Leaking GitHub Token

A developer's attempt to create AI-generated malware has backfired spectacularly, with the malicious package leaking its own GitHub private token. Researchers at Ox Security discovered the info-stealing npm package, named mouse5212-super-formatter, which had garnered 676 downloads before its exposure. The package was designed to target Claude users, posing as an internal utility for "archive deployment sync."

In reality, the malware authenticated with GitHub using an environment token or a hard-coded fallback. It would then check for the existence of a target repository, create one if necessary, and subsequently upload all files from a local directory via the GitHub Contents API. To obscure its actions, the malware stored stolen files in a randomly generated folder for each run and created a falsified network connections log to mimic diagnostic activity rather than data theft.

This leaked GitHub private token proved crucial for Ox Security researchers, enabling them to trace the stolen files and perform a detailed analysis of the malware's code. The GitHub account associated with the malicious package has since been deleted. Ox Security humorously categorized the threat as "Infostealer/Malware-Slop."

According to Ox Security, this incident highlights how some threat actors are leveraging AI to generate malicious code without adhering to fundamental operational security concepts and best practices. The reduced barrier to entry for creating malicious code suggests an increase in less sophisticated malware submissions to platforms like npm, as attackers attempt to emulate advanced persistent threat groups. This particular malware has been neutralized, but the trend indicates a growing concern for AI-assisted malware development, even in its current, less polished state.

Sources