Malicious Code Injection in dianaputri: A Threat to npm Ecosystem
Summary
MAL-2025-171110: Malicious code in dianaputri (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 'dianaputri' is part of the npm ecosystem, which is widely used for JavaScript package management. It is associated with the tea.xyz token reward campaign, which has been known to flood the npm registry with malicious packages. These packages are designed to inflate developer reputation scores through automated publishing scripts, making them a significant threat to the integrity of the npm ecosystem.
Vulnerability Detail
The vulnerability in 'dianaputri' originates from its inclusion in a malicious campaign that modifies the package.json file to remove private flags and alters version numbers. It generates random package names and continuously republishes variants, polluting the npm registry. This not only compromises the security of applications relying on this package but also affects the overall trustworthiness of the npm ecosystem.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall dianaputri
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 'dianaputri' package and look for alternative packages that provide similar functionality without the associated risks. Additionally, you can monitor your project for vulnerabilities using tools like Vulert, which analyzes your package-lock.json file for any open-source vulnerabilities.
Conclusion
The 'dianaputri' package poses a significant threat to the npm ecosystem due to its malicious code that modifies package files and repackages them. It is crucial for developers to remove this package from their projects and utilize monitoring tools like Vulert to stay informed about potential vulnerabilities.
See every vulnerability recorded for dianaputri →
FAQ
'dianaputri' is an npm package that has been identified as part of a malicious campaign aimed at inflating developer reputation scores through automated publishing.
The vulnerability can compromise the integrity of your application by introducing malicious code that modifies your package.json and republishing variants, potentially leading to security breaches.
You should immediately uninstall the 'dianaputri' package and check for any alternative packages that can fulfill your requirements without the associated risks.
Yes, you can use Vulert to monitor your project for open-source vulnerabilities by analyzing your package-lock.json file. You can access the Vulert playground at Vulert Scanner.
To prevent future vulnerabilities, always use trusted sources for packages, regularly update your dependencies, and utilize tools like Vulert to monitor for vulnerabilities in real-time.