Horizon Alert
Summary of the vulnerability and why it matters
A security issue has been identified in a compatibility layer that allows Express middleware to run within the Fastify web framework. This vulnerability could potentially bypass authentication or authorization controls on protected routes, exposing them to unauthenticated access.
- Middleware may not enforce access controls.
- It affects common web application frameworks.
- Confirm relevance and exposure of affected systems.
Attack Path
How an attacker could exploit the issue
Attackers can bypass authentication and authorization checks by exploiting how Express middleware is handled within the Fastify framework. This occurs when a path-scoped Express middleware, intended for security functions, is incorrectly configured due to string concatenation issues in the plugin's path merging. As a result, protected routes can become accessible to unauthenticated users because the middleware is skipped, despite the Fastify router still recognizing the route.
- No authentication needed to start.
- Unauthenticated access to protected routes.
- Risk of unauthorized data access.
Live Threat
Current exploitation, exposure, and threat context
When an application uses path-scoped Express middleware for authentication or authorization within a prefixed plugin, protected routes could be exposed to unauthenticated clients due to a middleware routing mismatch. This affects string, array, and regular-expression mount paths.
- Protected routes could be exposed.
- Middleware could be silently skipped.
- Unauthenticated access to protected resources.
Operational Fix
Recommended remediation, mitigation, and detection steps
This vulnerability impacts applications using @fastify/express, potentially exposing protected routes if Express middleware is configured with specific path prefixes. Application owners and platform teams should prioritize identifying all instances of @fastify/express, assessing their exposure, and planning upgrades to address the issue.
- Application and platform teams own this issue.
- Verify @fastify/express usage and route configurations.
- Plan upgrades during the next maintenance window.