Malicious Code Injection in @babell/core: A Critical Security Risk
Summary
MAL-2026-17497: Malicious code in @babell/core (npm). Affects @babell/core versions 8.0.6. 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 @babell/core is a malicious npm package that impersonates the legitimate Babel project. Babel is a widely used JavaScript compiler that allows developers to use next-generation JavaScript features. The malicious package mimics the real package's name and attributes, making it easy for unsuspecting users to install it, thinking they are using a trusted tool.
Vulnerability Detail
The vulnerability originates from a preinstall lifecycle script defined in the package's package.json file. This script executes a command that downloads a JavaScript file from a third-party host (gitflic.ru) and pipes it directly into Node for execution. This poses a significant security risk as the downloaded code is unverified and executed with the privileges of the installing user, potentially leading to unauthorized access or system compromise.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @babell/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, avoid using the @babell/core package and ensure that your project dependencies are sourced from trusted repositories. Regularly audit your dependencies for any malicious packages.
Conclusion
The @babell/core package poses a significant security risk due to its malicious code execution capabilities. Users must take immediate action to remove this package and ensure they are using the legitimate Babel package. Regular monitoring of dependencies using tools like Vulert can help prevent future vulnerabilities.
See every vulnerability recorded for @babell/core →
FAQ
Using @babell/core can lead to the execution of malicious code on your system, potentially compromising your data and security.
You can check your package.json and package-lock.json files for any references to @babell/core. You can also use tools like Vulert to monitor your dependencies.
Immediately uninstall the package using npm uninstall @babell/core and replace it with the legitimate @babel/core package.
Vulert monitors your package-lock.json file to alert you in real-time about any open-source vulnerabilities in your software without requiring access to your code.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.