Critical Malicious Code Vulnerability in blob-to-base64 Package
Summary
MAL-2025-191077: Malicious code in blob-to-base64 (npm). Affects blob-to-base64 versions 1.0.3. 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 blob-to-base64 package is an npm library that facilitates the conversion of binary data (blobs) into base64 encoded strings. This functionality is commonly used in web applications to handle file uploads and data transmission. However, the package has been compromised, leading to significant security concerns for any application utilizing it.
Vulnerability Detail
The vulnerability originates from the inclusion of malicious code within the blob-to-base64 package, specifically in version 1.0.3. This code can fully compromise any computer that has the package installed, allowing attackers to access sensitive information such as secrets and keys. The malicious nature of the code is classified under CWE-506, indicating that it contains embedded malicious code that poses a severe risk to users and their systems.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall blob-to-base64
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, consider using alternative packages that provide similar functionality without the associated risks. For example, you can use the 'base64-js' package for base64 encoding and decoding. Install it using npm with the following command: 'npm install base64-js'.
Conclusion
The blob-to-base64 package has been compromised with malicious code, posing a significant threat to any systems using it. Immediate action is required to uninstall the package and secure any sensitive information. Utilizing tools like Vulert can help monitor for such vulnerabilities in the future.
See every vulnerability recorded for blob-to-base64 →
FAQ
Immediately uninstall the package using 'npm uninstall blob-to-base64' and rotate any sensitive information stored on the affected system.
You can use Vulert, a tool that monitors and alerts for open-source vulnerabilities. Visit Vulert Scanner to check your application without any signup.
Currently, there is no patched version available for the blob-to-base64 package.
Failing to address this vulnerability can lead to unauthorized access to sensitive data, potential data breaches, and full system compromise.
It is highly recommended to remove the blob-to-base64 package and use alternative libraries to avoid security risks.