Critical Malicious Code Vulnerability in @nagular/core Package
Summary
MAL-2026-17499: Malicious code in @nagular/core (npm). Affects @nagular/core versions 1.0.67. 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 @nagular/core package is an npm library that is likely intended to provide functionality similar to Angular, but it appears to be a malicious typosquat. Typosquatting involves creating a package with a name similar to a popular package to deceive users into installing it. This package has been identified as having a preinstall script that executes potentially harmful code during installation.
Vulnerability Detail
The vulnerability originates from a preinstall lifecycle script in the @nagular/core package's package.json file. This script fetches a JavaScript payload from an unverified third-party host and executes it with Node.js during the npm install process. This allows an attacker to run arbitrary code on any machine that installs the package, posing a significant security risk as it operates with the installer's privileges before any package code is reviewed.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @nagular/core
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 workaround, you can avoid installing the @nagular/core package altogether. If you need similar functionality, consider using the official Angular package: @angular/core. You can install it using the command: npm install @angular/core.
Conclusion
The @nagular/core package poses a serious security risk due to its malicious preinstall script that executes unverified code. Users are advised to uninstall this package and replace it with trusted alternatives. Regular monitoring and auditing of dependencies are essential to maintain security.
See every vulnerability recorded for @nagular/core →
FAQ
The vulnerability involves malicious code execution due to a preinstall script that fetches and runs unverified JavaScript from a third-party source.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground without any signup.
You should uninstall the package immediately using the command: npm uninstall @nagular/core and replace it with a trusted alternative.
No, there is no patched version available for @nagular/core as it is a malicious package. It is recommended to avoid using it entirely.
Always verify the packages you install, use trusted sources, and regularly audit your dependencies for vulnerabilities.