Executive brief
React Router is a popular routing library used to build web applications. An attacker can exploit a vulnerability by adding a custom HTTP header to requests, which forces the framework into single-page application (SPA) mode and triggers an error on server-rendered applications. If the response is cached, this error gets served to all subsequent users, causing widespread service disruption and preventing legitimate users from accessing the application.
Technical details
The vulnerability exists in React Router's Framework mode when a page uses a loader. By injecting the X-React-Router-SPA-Mode header into requests, an attacker can force the application to operate in SPA mode when it is configured for server-side rendering (SSR). This mismatch triggers an unhandled error that corrupts the response content. The attack vector is network-based with no authentication, privileges, or user interaction required. If a caching layer (CDN, reverse proxy, or HTTP cache) is in place, the poisoned error response becomes cached and served to all users, resulting in persistent denial of service. The vulnerability affects React Router versions 7.2.0 through 7.5.1 and is fixed in version 7.5.2.
Affected products
- Remix React Router 7.2.0 through 7.5.1
Timeline
- 2025-04-24: disclosed: Advisory published
- 2025-04-24: patched: Fixed in React Router 7.5.2