Malicious Code Injection in building-build Package - npm Vulnerability
Summary
MAL-2026-17164: Malicious code in building-build (npm). Affects building-build versions 1.0.0. 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 'building-build' package is an npm module that is intended for use in web applications. However, it has been discovered that this package contains malicious code that exploits the ambient session of authenticated users. The package consists solely of an 'index.js' file that schedules a timer to fetch a hardcoded list of privileged paths from the web application and posts the response bodies to a specified endpoint, thereby compromising user data.
Vulnerability Detail
The vulnerability originates from the malicious code embedded in the 'building-build' package. When this package is loaded in a web application, it can access sensitive routes such as '/admin', '/dashboard', and '/api/flag'. The code then sends the contents of these routes to an endpoint '/addPost', effectively leaking sensitive information. This poses a significant risk to user privacy and application security, as it can lead to unauthorized access to sensitive data and potential exploitation by attackers.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall building-build
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, you can manually remove the 'building-build' package from your project dependencies by running the following command: npm uninstall building-build. Additionally, monitor your application for any unauthorized access or data leaks.
Conclusion
The 'building-build' package poses a serious security risk due to the embedded malicious code that can leak sensitive user data. It is essential to remove this package from your project and monitor for any potential exploitation. Utilizing tools like Vulert can help you stay informed about vulnerabilities in your open-source dependencies.
See every vulnerability recorded for building-build →
FAQ
The 'building-build' package is an npm module that has been found to contain malicious code designed to exploit authenticated user sessions.
The malicious code fetches sensitive paths from the web application and posts the response bodies to a specified endpoint, compromising user data.
The risks include unauthorized access to sensitive information, potential data leaks, and exploitation of user sessions by attackers.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
You should immediately uninstall the package and monitor your application for any unauthorized access or data leaks.