Malicious Code Injection in kentung-24: A Threat to npm Packages
Summary
MAL-2025-157504: Malicious code in kentung-24 (npm). Affected versions are not published. No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The package 'kentung-24' is part of the npm ecosystem and is associated with the tea.xyz token reward campaign. This package is designed to facilitate the automatic generation and publication of derivative packages, which can inflate developer reputation scores for token rewards. However, it has been identified as containing malicious code that compromises the integrity of the npm registry.
Vulnerability Detail
The vulnerability in 'kentung-24' originates from its malicious payload, which modifies the package.json file to remove private flags, alters version numbers, and generates random package names. This behavior leads to the continuous republishing of variants, polluting the npm registry and potentially harming developers who rely on legitimate packages. The malicious scripts (auto.js, autopublish.js, etc.) are specifically designed to automate this process, making it difficult for users to detect the malicious activity.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall kentung-24
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, you can avoid using the 'kentung-24' package and look for alternative packages that provide similar functionality without the risk of malicious code. Additionally, regularly audit your npm packages using tools like npm audit to identify and address vulnerabilities.
Conclusion
The 'kentung-24' package poses a significant threat due to its malicious code that alters package metadata and floods the npm registry. It is crucial for developers to be vigilant, remove affected packages, and utilize tools like Vulert to monitor for vulnerabilities in real-time.
See every vulnerability recorded for kentung-24 →
FAQ
The primary risk is the potential for malicious code to alter your project's dependencies, leading to security breaches and the pollution of the npm registry.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By utilizing the Vulert playground, you can check if your application is affected without any signup.
If you have installed kentung-24, immediately uninstall it using 'npm uninstall kentung-24' and check for any other affected packages in your project.
Yes, tools like npm audit and Vulert can help you identify and manage vulnerabilities in your npm packages effectively.
Regularly audit your dependencies, keep your packages updated, and use trusted sources for package installations to minimize the risk of vulnerabilities.