Two critical vulnerabilities in the widely used React Router library (CVE-2025-43864 and CVE-2025-43865) have been patched, but applications running versions 7.0.0 to 7.5.1 remain at risk of cache-poisoning attacks, content spoofing, and data manipulation.
The flaws enable attackers to corrupt cached responses or inject malicious content, potentially rendering applications unusable or facilitating phishing campaigns.
Key Vulnerabilities and Exploitation Methods
CVE ID | Risk Profile | Attack Vector | Impact |
---|---|---|---|
CVE-2025-43864 | Cache Poisoning & DoS (CVSS 7.5) | Inject X-React-Router-SPA-Mode header | Renders cached pages unusable via errors |
CVE-2025-43865 | Data Spoofing & XSS (CVSS 8.3) | Manipulate X-React-Router-Prerender-Data | Alters pre-rendered data for phishing/XSS |
CVE-2025-43864: Attackers can force server-side rendered (SSR) applications into single-page application (SPA) mode by adding the X-React-Router-SPA-Mode
header to requests.
This triggers errors that corrupt the page, and if cached, the poisoned response becomes persistent, leading to widespread denial-of-service (DoS).
CVE-2025-43865: By spoofing the X-React-Router-Prerender-Data
header, attackers can overwrite server-side data during pre-rendering.
This allows content manipulation, such as injecting malicious scripts or altering displayed values, which could enable stored cross-site scripting (XSS) attacks.

Impact Analysis
- Cache Poisoning: Exploiting CVE-2025-43864 allows attackers to replace legitimate content with error messages across all cached instances, effectively taking down application functionality for all users.
- Data Integrity Risks: CVE-2025-43865 enables attackers to modify financial figures, user credentials, or other critical data in pre-rendered responses, creating opportunities for fraud or misinformation campaigns.
- No Authentication Required: Both vulnerabilities can be exploited without prior authentication, lowering the barrier for attackers.
Mitigation Steps
- Update Immediately: Upgrade to React Router v7.5.2, which patches both vulnerabilities.
- Purge Caches: Invalidate existing CDN and server caches to remove poisoned responses. Vercel has already purged its global CDN.
- Block Malicious Headers: Configure firewalls or reverse proxies to strip
X-React-Router-SPA-Mode
andX-React-Router-Prerender-Data
headers. - Audit Loaders: Review server-side loaders for unintended data exposure or insufficient validation.
Security firm Cold-Try warns, “These flaws highlight the risks of improper header handling in SSR frameworks. Attackers can exploit them with minimal effort, making swift patching critical”.
With over 20 million weekly npm downloads, React Router’s widespread adoption amplifies the urgency for organizations to act.
Industry Response
- Vercel: Deployed firewall rules to block malicious headers and preemptively purged its CDN.
- React Router Team: Released v7.5.2 with enhanced header validation and data integrity checks.
Developers are urged to prioritize updates and monitor for anomalous header activity.
Delaying mitigation risks large-scale application disruptions or compliance violations due to data tampering.
Find this Story Interesting! Follow us on LinkedIn and X to Get More Instant updates