Cyber Security News

Malicious npm Package with 206K Downloads Targeting GitHub Repositories to Steal Tokens

On Friday, November 7th, Veracode Threat Research discovered a dangerous typosquatting campaign targeting developers using GitHub Actions.

The malicious npm package “@acitons/artifact” had accumulated over 206,000 downloads before being removed, posing a significant threat to GitHub-owned repositories and potentially compromising sensitive authentication tokens.

The malicious package mimicked the legitimate “@actions/artifact” npm package, which is part of the official GitHub Actions Toolkit.

The attacker swapped the letters “ti” for “it” in the package name a classic typosquatting technique designed to catch developers who mistype dependency names during installation. This subtle obfuscation proved effective, accumulating hundreds of thousands of downloads from unsuspecting developers.

Sophisticated Post-Install Attack

Veracode researchers identified six malicious versions of the package, each containing a post-install hook that executes during package installation.

The hook downloaded and executed obfuscated malware that evaded detection by popular antivirus products. At the time of discovery, the malicious binary was flagged by zero antivirus vendors on VirusTotal, highlighting the sophisticated nature of the threat.

The attack chain was carefully engineered. The malware consisted of an obfuscated shell script compiled using the Shell Script Compiler (shc) tool.

Upon execution, it re-executed itself from bash after modifying environment variables to activate its payload. This resulted in the extraction and execution of a Node package containing an obfuscated JavaScript file named “verify.js.”

The analysis revealed this was a precision-targeted campaign against GitHub itself. The verify.js script contained checks for GitHub-specific environment variables that are only set during GitHub Actions builds.

Malicious versions had been taken down by the malware author.

The malware included explicit targeting logic, exiting silently unless the repository owner matched specific targets, including the GitHub organization itself.

Most critically, the malware was designed to exfiltrate authentication tokens available within the build environment.

Once obtained, threat actors intended to use these tokens to publish new malicious artifacts impersonating GitHub, potentially compromising downstream users and creating a cascading supply chain attack.

Technical Sophistication and Intentional Expiry

The campaign demonstrated advanced operational security practices. Each malicious binary contained a hardcoded expiry date set to self-terminate after a specific date the primary sample expired on November 6th UTC, with another set to expire the following day.

This suggests deliberate planning and a limited-duration campaign, possibly to avoid prolonged detection.GitHub identified the malware since it seems the two GitHub users have been removed. 

Exfiltration code found within obfuscated “verify.js”.

Exfiltration occurred through encrypted channels. The malware retrieved an AES encryption key from a remote command-and-control server and transmitted encrypted data to a GitHub App-based endpoint, further obscuring the attacker’s infrastructure.

Veracode notified npm of the malicious package, leading to its removal. Veracode Package Firewall customers received immediate protection on Friday when researchers triaged the threat.

Additionally, Veracode researchers uncovered and blocked 12 versions of another malicious package named “8jfiesaf83” from the same campaign earlier in November.

This incident underscores the growing threat of supply chain attacks, now ranked as the third most critical vulnerability category in the OWASP Top 10 2025.

The attack demonstrates how typosquatting remains an effective vector for compromising CI/CD infrastructure and gaining access to sensitive authentication credentials.

Organizations using GitHub Actions should scrutinize their dependency management practices and implement additional verification layers for package installations.

“The packages referenced in Veracode’s blog were part of a tightly controlled exercise conducted by GitHub’s Red Team. GitHub takes security seriously and regularly tests its security posture through rigorous, realistic Red Team exercises to ensure resilience against current threat actor techniques. At no point were GitHub systems or data at risk. — A GitHub Spokesperson”

Follow us on Google News, LinkedIn, and X to Get Instant Updates and Set GBH as a Preferred Source in Google.

Mayura Kathir

Mayura Kathir is a cybersecurity reporter at GBHackers News, covering daily incidents including data breaches, malware attacks, cybercrime, vulnerabilities, zero-day exploits, and more.

Recent Posts

Hackers Use ConnectWise SkyKick Credentials to Access Microsoft 365, Halting Cloud Backups

Attackers abused compromised ConnectWise Cloud Backup credentials to access Microsoft 365 customer environments, prompting ConnectWise…

1 day ago

Anthropic’s Claude AI Uncovers Origins of NSA-Provided Cryptographic Keys After 25 Years

Anthropic says an internal Claude research model reconstructed how the National Security Agency generated seeds…

1 day ago

Critical WordPress Flaws Allow Attackers to Execute Remote Code Without Authentication

Two WordPress Core vulnerabilities can be chained to execute remote code without authentication, according to…

2 days ago

OpenBSD Kernel Flaw Dating Back 37 Years Enables Local Privilege Escalation to Root

A newly disclosed OpenBSD kernel exploitation chain combines a shared memory accounting flaw with a…

2 days ago

GhostAction Hackers Hide Credential-Stealing Malware in Fake Font Files Across 94 GitHub Repositories

GhostAction attackers have expanded their GitHub credential theft campaign with a second stage that disguises…

2 days ago

SideCopy Hackers Target Indian Organizations With ReverseRAT Malware to Steal Data

Indian authorities have warned that SideCopy hackers are targeting Indian organizations, including academic institutions, with…

2 days ago