CVE-2026-33808: @fastify/express Authentication Bypass via URL Normalization Gaps
Summary
CVE-2026-33808: @fastify/express v4.0.4 fails to normalize URLs before passing them to Express middleware when Fastify router normalization options are enabled. Affects @fastify/express versions < 4.0.5. Fixed in 4.0.5. 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 @fastify/express package is a Fastify plugin that allows developers to use Express middleware within Fastify applications. It provides a seamless integration of Express's robust middleware capabilities while benefiting from Fastify's performance and features. However, a vulnerability exists in version 4.0.4 that allows attackers to bypass authentication mechanisms due to improper URL normalization.
Vulnerability Detail
The vulnerability arises from @fastify/express failing to normalize URLs before passing them to Express middleware when certain Fastify router options are enabled. This can lead to a complete bypass of path-scoped authentication middleware. Attackers can exploit this by sending requests with duplicate slashes or semicolon delimiters, which are not correctly handled, allowing unauthorized access to protected routes. The issue is particularly critical as it affects applications relying on Express middleware for authentication, potentially exposing sensitive data and functionalities.
How To Fix
Minimum fixed version
4.0.5
This is the first release that contains the fix.
npm install @fastify/express@4.0.5
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can manually normalize URLs in your Express middleware before processing requests. Here is an example of how to implement this in your Express middleware:
app.use('/admin', function(req, res, next) {
req.url = req.url.replace(/\/\//g, '/'); // Normalize duplicate slashes
req.url = req.url.split(';')[0]; // Strip semicolon-delimited parameters
next();
});
Conclusion
CVE-2026-33808 represents a significant security risk for applications using @fastify/express version 4.0.4. It is crucial for developers to update to the patched version 4.0.5 to mitigate the risk of authentication bypass and protect sensitive application data.
See every vulnerability recorded for @fastify/express →
FAQ
CVE-2026-33808 is a vulnerability in the @fastify/express package that allows attackers to bypass authentication due to improper URL normalization.
The vulnerability affects @fastify/express version 4.0.4. Versions 4.0.5 and later have been patched.
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 any signup.
If exploited, this vulnerability can lead to unauthorized access to protected routes, exposing sensitive data and functionalities to attackers.
The CVSS score for CVE-2026-33808 is 9.1, indicating a critical level of severity.
Related vulnerabilities
Recent vulnerabilities recorded for @fastify/express.