Malicious Code Vulnerability in @anfular/core Package
Summary
MAL-2026-17533: Malicious code in @anfular/core (npm). Affects @anfular/core versions 22.2.1. 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 @anfular/core package is a one-character typosquat of the widely used @angular/core package. It is designed to mimic the official Angular package, featuring similar manifest fields such as scope, description, and author information. This package is intended for use in web applications, providing core functionalities of the Angular framework. However, due to its malicious nature, it poses significant security risks to users who mistakenly install it instead of the legitimate Angular package.
Vulnerability Detail
The vulnerability originates from the @anfular/core package version 22.2.1, which contains a postinstall script that executes malicious code. This script downloads a JavaScript payload from an attacker-controlled URL and executes it with the installer's privileges. This allows the attacker to run arbitrary code on the user's machine, leading to potential data breaches, system compromise, and unauthorized access to sensitive information. The code is unverified and hosted outside of any official registry, making it particularly dangerous.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @anfular/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 temporary workaround, ensure that your package.json does not include @anfular/core and regularly audit your dependencies for any typosquatting risks. You can also use tools like Vulert to monitor your project for vulnerabilities. To check if your application is affected by this vulnerability, visit the Vulert playground at https://vulert.com/scanner without any signup.
Conclusion
The @anfular/core package poses a significant security risk due to its malicious code execution capabilities. Users are advised to uninstall this package and switch to the legitimate @angular/core package. Regular monitoring of dependencies and using tools like Vulert can help mitigate such risks in the future.
See every vulnerability recorded for @anfular/core →
FAQ
Typosquatting is a malicious practice where attackers create packages with names that are very similar to popular packages, hoping that users will mistakenly install them.
You can check your package.json file or run 'npm list @anfular/core' in your terminal to see if the package is installed.
Immediately uninstall the suspicious package and run a security scan on your system to check for any unauthorized changes or malware.
Vulert uses your package-lock.json file to monitor and alert you in real-time for open-source vulnerabilities in your software, ensuring you stay informed about potential risks.
To prevent typosquatting, always verify the package name and source before installation, and consider using tools that check for vulnerabilities in your dependencies.