Malicious Code Detected in electon Package - Security Alert
Summary
MAL-2025-19412: Malicious code in electon (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 electon package is a Node.js library commonly used for building cross-platform desktop applications. It provides developers with tools to create native-like applications using web technologies. However, recent findings have revealed that this package contains malicious code, posing significant security risks to applications that utilize it.
Vulnerability Detail
The vulnerability stems from the inclusion of malicious code within the electon package. This code can potentially compromise the security of applications, leading to unauthorized access, data breaches, or other malicious activities. The issue was introduced in version 0 and affects all subsequent versions, making it critical for users to address this vulnerability promptly.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall electon
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 measure, users can avoid using the electon package until a secure version is released. Additionally, consider reviewing your package-lock.json file to identify any dependencies that may also be affected.
Conclusion
The electon package has been found to contain malicious code, posing serious security risks to applications. It is crucial for developers to update to a patched version or implement workarounds to mitigate potential threats. Regular monitoring using tools like Vulert can help maintain application security.
See every vulnerability recorded for electon →
FAQ
The electon package is a Node.js library designed for building cross-platform desktop applications using web technologies.
The malicious code can lead to unauthorized access and potential data breaches in applications that utilize the electon package.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring any signup.
As a workaround, consider avoiding the use of the electon package until a secure version is released and review your package-lock.json for any dependencies that may be affected.
The vulnerability was discovered by Amazon Inspector, a security tool that helps identify vulnerabilities in applications.