Critical Vulnerability in node-static Package: Null Byte Input Handling
Summary
DEBIAN-CVE-2025-11149: This affects all versions of the package node-static; all versions of the package @nubosoftware/node-static. Affects node-static versions 0.7.11+~0.7.7-1 – 0.7.9-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 node-static package is a popular Node.js module used for serving static files over HTTP. It is designed to simplify the process of serving files from a directory, making it easier for developers to implement static file hosting in their applications. However, this package has a critical vulnerability that arises from its failure to properly handle user input containing null bytes, which can lead to server crashes and unauthorized access.
Vulnerability Detail
This vulnerability affects all versions of the node-static package, as well as the @nubosoftware/node-static package. The issue originates from the package's inability to catch exceptions when user input includes null bytes. Attackers can exploit this flaw by accessing URLs formatted as http://host/%00, which can crash the server and potentially expose sensitive information. The lack of input validation and error handling makes this vulnerability particularly severe, as it can be easily triggered by malicious users.
How To Fix
No fixed version is published for this vulnerability.
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 implement input validation in your application to sanitize user inputs and prevent null bytes from being processed. For example, you can add a middleware function in your Node.js application to check for null bytes in the request URLs and reject such requests. Here's a sample code snippet:
app.use((req, res, next) => {
if (req.url.includes('\0')) {
return res.status(400).send('Invalid request');
}
next();
});
Conclusion
The node-static package has a critical vulnerability due to improper handling of null byte inputs, which can lead to server crashes and unauthorized access. It is crucial for developers to update their packages and implement input validation to mitigate this risk. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for node-static →
FAQ
The node-static package is a Node.js module that allows developers to serve static files over HTTP easily.
The vulnerability allows attackers to crash the server by sending requests with null bytes in the URL.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
Implement input validation as a temporary workaround to prevent null byte inputs from being processed.
More details can be found in the official vulnerability report at https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2025-11149.json.
References
Related vulnerabilities
Recent vulnerabilities recorded for node-static.