Malicious Code Injection in danielmorgan Package: npm Vulnerability Overview
Summary
MAL-2025-171080: Malicious code in danielmorgan (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 danielmorgan package is part of the npm ecosystem, which is widely used for managing JavaScript packages. This package has been identified as part of a malicious campaign that aims to exploit the npm registry by flooding it with derivative packages. The primary functionality of danielmorgan is to serve as a token reward mechanism for the tea.xyz protocol, but it has been compromised to manipulate package metadata and inflate developer reputation scores.
Vulnerability Detail
The vulnerability in the danielmorgan package originates from its association with a malicious campaign that utilizes autopublish scripts to create and publish numerous derivative packages with randomized names. This behavior modifies the package.json file by removing private flags, altering version numbers, and continuously republishing variants, which can lead to pollution of the npm registry and potential security risks for developers relying on this package.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall danielmorgan
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 remove the danielmorgan package from your project by executing the command: npm uninstall danielmorgan. This will prevent any malicious code from executing until a secure version is available.
Conclusion
The danielmorgan package has been compromised, posing a significant risk to developers using it. It is crucial to take immediate action by uninstalling the package and monitoring for updates. Utilizing tools like Vulert can help maintain the security of your applications by providing real-time vulnerability alerts.
See every vulnerability recorded for danielmorgan →
FAQ
The danielmorgan package is an npm package that has been identified as part of a malicious campaign aimed at exploiting the npm registry.
The vulnerability can lead to the pollution of the npm registry and may compromise the integrity of your project by introducing malicious code.
You should uninstall the danielmorgan package immediately and monitor for any updates or patches that may be released.
You can use tools like Vulert, which monitors and alerts for open-source vulnerabilities in real-time by analyzing your package-lock.json file.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.