Malicious Code Injection in gun5 Package: A Threat to npm Users

gun5 Updated 26 Nov 2025

Summary

12/11/2025
CRITICAL
No i
Critical
Not published

MAL-2025-181499: Malicious code in gun5 (npm). Affected versions are not published. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The gun5 package is part of the npm ecosystem, primarily used for various JavaScript applications. It has gained attention due to its involvement in the tea.xyz token reward campaign, which has been associated with malicious activities. The package is designed to facilitate the automatic generation and publication of derivative packages, which can lead to reputation inflation for developers involved in the tea protocol.

Vulnerability Detail

The vulnerability in the gun5 package originates from its malicious code that modifies the package.json file. This code removes private flags, alters version numbers, and generates random package names, primarily themed around Indonesian culture. The malicious payload continuously republishes these variants, polluting the npm registry and potentially compromising the integrity of applications that rely on this package. The ramifications include the risk of developers unknowingly using compromised packages, leading to security breaches and loss of trust in the npm ecosystem.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall gun5

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can avoid using the gun5 package until a secure version is released. Additionally, consider using alternative packages that provide similar functionality without the associated risks.

Conclusion

The gun5 package has been identified as containing malicious code that poses a significant risk to users within the npm ecosystem. It is crucial to take immediate action by updating or removing the package to safeguard your applications. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for gun5 →

Share this vulnerability

FAQ

The gun5 package is a JavaScript library available on npm, used in various applications, but it has been compromised with malicious code.

The malicious code can modify your package.json, remove private flags, and publish unauthorized versions of your application, potentially leading to security vulnerabilities.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without any signup.

If you have installed gun5, it is recommended to update the package immediately to the latest version or remove it until a secure version is available.

Regularly monitor your dependencies using tools like Vulert, which can alert you to vulnerabilities in real-time, helping you maintain a secure application.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall gun5

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback