The open-source software supply chain is facing another bizarre and careless attack. Cybersecurity researchers at OX Security have discovered a malicious npm package designed to steal sensitive user data and upload it to a remote repository.
However, the attack took an unexpected turn when the threat actor’s own GitHub access token was found hardcoded directly into the script.
This critical mistake highlights a growing and dangerous trend in the cybersecurity landscape. Inexperienced threat actors are increasingly using Artificial Intelligence to generate malware, thereby bypassing the need for deep technical knowledge.
While this lowers the barrier to entry for cybercrime, it also results in sloppy malware that completely ignores basic operational security and best practices.
AI npm Malware Backfires
Disguised as a harmless internal utility, the malicious script claims to be an “archive deployment sync” tool. During the post-installation phase, it pretends to validate a GitHub repository and capture a lightweight network status snapshot.
To avoid raising suspicion, the script uses bland, highly technical wording in its comments and commit messages.

It even generates a fake network connections log to make its execution look like standard system diagnostics rather than unauthorized data collection.
Behind this disguise, the operational reality is pure data theft. The script authenticates to GitHub using an environment token or, if none is available, the attacker’s hardcoded fallback token.

It checks if the attacker’s target repository exists and automatically creates one if it does not.
From there, the malware recursively searches the victim’s local directories and uploads every discovered file using the GitHub Contents API.
Data is prepared for remote transfer using base64 encoding to ensure it passes through seamlessly.

To organize the stolen information, the malware stores exfiltrated files under a random folder name generated for each run. This helps the threat actor separate multiple theft sessions from different victims.
Researchers discovered that the attacker’s GitHub account was created just hours before the first malicious npm version was uploaded.
The attacker even conducted about seven active exfiltration tests on a “test” repository before the account was eventually deleted, leaving a clear trail of their actions.
If you have downloaded or interacted with this npm package, immediate incident response actions are required to secure your environment, security said.
The threat actor may have copied your sensitive files, and the presence of this package compromises your system’s integrity.
| Package Name | Affected Versions | Status |
|---|---|---|
| mouse5212-super-formatter | All versions | Active (at time of report) |
As the barrier to creating malicious code drops significantly due to AI, organizations can expect to see an influx of sloppy malware campaigns.
Many of these low-skilled attackers will attempt to mimic advanced persistent threat (APT) groups to steal data.
Until package managers like npm implement stricter automated malware blocking, development teams must remain on high alert against these clumsy but dangerous supply chain threats.
Follow us on Google News , LinkedIn and X to Get More Instant Updates. Set Cyberpress as a Preferred Source in Google.