NPM PackageGate Opens Door to Hackers’ Cyber Attacks

NPM PackageGate Opens Door to Hackers’ Cyber Attacks

NPM PackageGate Opens Door to Hackers’ Cyber Attacks, Researchers from Koi Security have discovered serious vulnerabilities in major JavaScript package managers, including NPM, PNPM, VLT, and Bun. These flaws, collectively known as PackageGate, allow attackers to bypass security protections and secretly inject malicious code into software projects.

The issue affects thousands of developers and companies worldwide, as most modern web applications rely on third-party libraries from open-source repositories.

PackageGate Spreads Malware Through Libraries

After the large-scale Shai-Hulud attack, which compromised hundreds of npm packages, the developer community adopted basic security practices:

  • disabling installation scripts;
  • using lockfiles;
  • pinning dependency versions.

These measures were expected to protect projects from supply chain attacks. However, Koi researchers have demonstrated that such defenses are no longer sufficient.

PackageGate proves that even well-configured projects remain vulnerable to hidden attacks.

Vulnerabilities Discovered by Researchers

During extensive testing, experts identified six critical zero-day vulnerabilities that allow attackers to bypass standard security controls.

Main risks include:

  • bypassing script restrictions;
  • replacing system files;
  • executing malicious commands;
  • loading modified packages;
  • gaining remote system access.

These weaknesses create opportunities for silent and persistent compromise.

PackageGate Creates Massive Cybersecurity Risk

Package ManagerVulnerability TypePotential ImpactStatus
NPMGit replacement via .npmrcFull system takeoverUnfixed
PNPMPrepare script executionSilent malwareFixed
VLTPath traversalFile overwriteFixed
BunPackage name trustFake script executionFixed

Real-World Attack Example Using NPM

In NPM, attackers can create a malicious Git dependency containing a fake .npmrc file. This file replaces the system Git binary with a harmful script.

As a result:

  • attacker code runs automatically;
  • the --ignore-scripts option becomes ineffective;
  • remote access to servers becomes possible.

Researchers confirmed that this technique has been used to deploy reverse shells and gain long-term control over compromised systems.

Why Lockfiles Fail to Protect Projects

Lockfiles are designed to ensure code integrity after verification. However, researchers found that:

  • some managers accept archives without integrity hashes;
  • attackers can modify code after review;
  • targeted payloads can be delivered selectively.

This allows malware to remain hidden from scanners and security tools.

One example is the PhantomRaven campaign, which reached more than 86,000 downloads while avoiding detection.

Industry Response and Security Recommendations

Koi Security reported all PackageGate vulnerabilities to affected vendors.

  • PNPM, VLT, and Bun fixed the issues quickly.
  • NPM declined to recognize the problem.

According to researchers, security responsibility should not be shifted entirely to users.

Recommended Security Measures:

  • ✅ always commit lockfiles;
  • ✅ disable installation scripts;
  • ✅ update package managers regularly;
  • ✅ audit dependencies;
  • ✅ consider alternatives to NPM;
  • ✅ implement internal security reviews.

Key Risks for Organizations

  • hidden malware installation;
  • sensitive data leaks;
  • server compromise;
  • customer trust loss;
  • reputational damage;
  • financial losses.

⚠️ Consequences of Ignoring These Threats

If such vulnerabilities remain unaddressed, they will enable large-scale attacks against software providers, financial institutions, government platforms, and digital services. Weak oversight will accelerate cybercrime, increase data breaches, and undermine trust in digital infrastructure. Only systematic security improvements, transparency, and accountability can prevent long-term damage to the global IT ecosystem.


SOURCE: https://securityaffairs.com/187416/hacking/packagegate-bugs-let-attackers-bypass-protections-in-npm-pnpm-vlt-and-bun.html

Leave a Reply

Your email address will not be published. Required fields are marked *