Every CVE Search/ Get API key

CVE-2025-43865

React Router allows pre-render data spoofing on React-Router framework mode

8.2 HighPublic exploitFix available

React Router is a router for React. In versions on the 7.0 branch prior to version 7.5.2, it's possible to modify pre-rendered data by adding a header to the request. This allows to completely spoof its contents and modify all the values ​​of the data object passed to the HTML. This issue has been patched in version 7.5.2.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
Low
Availability
High

Exploit likelihood

0.81%Up 0.8 points since Apr 25, 2025
90%50%10%1%

What each source reports

CVE List Score used 8.2

React Router allows pre-render data spoofing on React-Router framework mode

React Router is a router for React. In versions on the 7.0 branch prior to version 7.5.2, it's possible to modify pre-rendered data by adding a header to the request. This allows to completely spoof its contents and modify all the values ​​of the data object passed to the HTML. This issue has been patched in version 7.5.2.

Record
CVE-2025-43865
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Weakness
CWE-345
Updated
2026-11-02
EUVDEUVD-2025-11979 8.2

React Router is a router for React. In versions on the 7.0 branch prior to version 7.5.2, it's possible to modify pre-rendered data by adding a header to the request. This allows to completely spoof its contents and modify all the values ​​of the data object passed to the HTML. This issue has been patched in version 7.5.2.

Record
EUVD-2025-11979
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-cpj6-fhp6-mr6j 8.2

React Router allows pre-render data spoofing on React-Router framework mode

Summary

After some research, it turns out that it's possible to modify pre-rendered data by adding a header to the request. This allows to completely spoof its contents and modify all the values ​​of the data object passed to the HTML. Latest versions are impacted.

Details

The vulnerable header is X-React-Router-Prerender-Data, a specific JSON object must be passed to it in order for the spoofing to be successful as we will see shortly. Here is the vulnerable code :

<img width="776" alt="Capture d’écran 2025-04-07 à 05 36 58" src="https://github.com/user-attachments/assets/c95b0b33-15ce-4d30-9f5e-b10525dd6ab4" />

To use the header, React-router must be used in Framework mode, and for the attack to be possible the target page must use a loader.

Steps to reproduce

Versions used for our PoC:

  • "@react-router/node": "^7.5.0",
  • "@react-router/serve": "^7.5.0",
  • "react": "^19.0.0"
  • "react-dom": "^19.0.0"
  • "react-router": "^7.5.0"
  1. Install React-Router with its default configuration in Framework mode (https://reactrouter.com/start/framework/installation)
  2. Add a simple page using a loader (example: routes/ssr)
  3. Access your page (which uses the loader) by suffixing it with .data. In our case the page is called /ssr:

We access it by adding the suffix .data and retrieve the data object, needed for the header:

  1. Send your request by adding the X-React-Router-Prerender-Data header with the previously retrieved object as its value. You can change any value of your data object (do not touch the other values, the latter being necessary for the object to be processed correctly and not throw an error):

As you can see, all values ​​have been changed/overwritten by the values ​​provided via the header.

Impact

The impact is significant, if a cache system is in place, it is possible to poison a response in which all of the data transmitted via a loader would be altered by an attacker allowing him to take control of the content of the page and modify it as he wishes via a cache-poisoning attack. This can lead to several types of attacks including potential stored XSS depending on the context in which the data is injected and/or how the data is used on the client-side.

Credits

  • Rachid Allam (zhero;)
  • Yasser Allam (inzo_)
Record
GHSA-cpj6-fhp6-mr6j
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Weakness
CWE-345
Updated
2026-11-02
NVD 8.2

React Router is a router for React. In versions on the 7.0 branch prior to version 7.5.2, it's possible to modify pre-rendered data by adding a header to the request. This allows to completely spoof its contents and modify all the values ​​of the data object passed to the HTML. This issue has been patched in version 7.5.2.

Record
CVE-2025-43865
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Weakness
CWE-345
Updated
2026-11-02
OSV 8.2

React Router allows pre-render data spoofing on React-Router framework mode

React Router is a router for React. In versions on the 7.0 branch prior to version 7.5.2, it's possible to modify pre-rendered data by adding a header to the request. This allows to completely spoof its contents and modify all the values ​​of the data object passed to the HTML. This issue has been patched in version 7.5.2.

Record
CVE-2025-43865
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Weakness
CWE-345
Updated
2026-11-02
OSVGHSA-cpj6-fhp6-mr6j 8.2

React Router allows pre-render data spoofing on React-Router framework mode

Summary

After some research, it turns out that it's possible to modify pre-rendered data by adding a header to the request. This allows to completely spoof its contents and modify all the values ​​of the data object passed to the HTML. Latest versions are impacted.

Details

The vulnerable header is X-React-Router-Prerender-Data, a specific JSON object must be passed to it in order for the spoofing to be successful as we will see shortly. Here is the vulnerable code :

<img width="776" alt="Capture d’écran 2025-04-07 à 05 36 58" src="https://github.com/user-attachments/assets/c95b0b33-15ce-4d30-9f5e-b10525dd6ab4" />

To use the header, React-router must be used in Framework mode, and for the attack to be possible the target page must use a loader.

Steps to reproduce

Versions used for our PoC:

  • "@react-router/node": "^7.5.0",
  • "@react-router/serve": "^7.5.0",
  • "react": "^19.0.0"
  • "react-dom": "^19.0.0"
  • "react-router": "^7.5.0"
  1. Install React-Router with its default configuration in Framework mode (https://reactrouter.com/start/framework/installation)
  2. Add a simple page using a loader (example: routes/ssr)
  3. Access your page (which uses the loader) by suffixing it with .data. In our case the page is called /ssr:

We access it by adding the suffix .data and retrieve the data object, needed for the header:

  1. Send your request by adding the X-React-Router-Prerender-Data header with the previously retrieved object as its value. You can change any value of your data object (do not touch the other values, the latter being necessary for the object to be processed correctly and not throw an error):

As you can see, all values ​​have been changed/overwritten by the values ​​provided via the header.

Impact

The impact is significant, if a cache system is in place, it is possible to poison a response in which all of the data transmitted via a loader would be altered by an attacker allowing him to take control of the content of the page and modify it as he wishes via a cache-poisoning attack. This can lead to several types of attacks including potential stored XSS depending on the context in which the data is injected and/or how the data is used on the client-side.

Credits

  • Rachid Allam (zhero;)
  • Yasser Allam (inzo_)
Record
GHSA-cpj6-fhp6-mr6j
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Weakness
CWE-345
Updated
2026-11-02
Show 11 moreShow less
OSVCLSA-2026-1775521859 No score

TuxCare security update for react-router (2 CVEs)

TuxCare rebuilt react-router to address 2 CVEs. Fixed in 7.5.1-tuxcare.1.

Record
CLSA-2026-1775521859
Updated
2026-11-02
OSVCLSA-2026-1792253396 No score

TuxCare security update for react-router-dom (2 CVEs)

TuxCare rebuilt react-router-dom to address 2 CVEs. Fixed in 7.5.1-tuxcare.1.

Record
CLSA-2026-1792253396
Updated
2026-11-02
OSVCLSA-2026-1792419110 No score

TuxCare security update for @react-router/architect (2 CVEs)

TuxCare rebuilt @react-router/architect to address 2 CVEs. Fixed in 7.5.1-tuxcare.1.

Record
CLSA-2026-1792419110
Updated
2026-11-02
OSVCLSA-2026-1792419187 No score

TuxCare security update for @react-router/cloudflare (2 CVEs)

TuxCare rebuilt @react-router/cloudflare to address 2 CVEs. Fixed in 7.5.1-tuxcare.1.

Record
CLSA-2026-1792419187
Updated
2026-11-02
OSVCLSA-2026-1792419266 No score

TuxCare security update for @react-router/express (2 CVEs)

TuxCare rebuilt @react-router/express to address 2 CVEs. Fixed in 7.5.1-tuxcare.1.

Record
CLSA-2026-1792419266
Updated
2026-11-02
OSVCLSA-2026-1792419622 No score

TuxCare security update for @react-router/node (2 CVEs)

TuxCare rebuilt @react-router/node to address 2 CVEs. Fixed in 7.5.1-tuxcare.1.

Record
CLSA-2026-1792419622
Updated
2026-11-02
OSVCLSA-2026-1792421940 No score

TuxCare security update for @react-router/remix-routes-option-adapter (2 CVEs)

TuxCare rebuilt @react-router/remix-routes-option-adapter to address 2 CVEs. Fixed in 7.5.1-tuxcare.1.

Record
CLSA-2026-1792421940
Updated
2026-11-02
OSVCLSA-2026-1792424729 No score

TuxCare security update for @react-router/dev (2 CVEs)

TuxCare rebuilt @react-router/dev to address 2 CVEs. Fixed in 7.5.1-tuxcare.1.

Record
CLSA-2026-1792424729
Updated
2026-11-02
OSVCLSA-2026-1792425404 No score

TuxCare security update for @react-router/fs-routes (2 CVEs)

TuxCare rebuilt @react-router/fs-routes to address 2 CVEs. Fixed in 7.5.1-tuxcare.1.

Record
CLSA-2026-1792425404
Updated
2026-11-02
OSVCLSA-2026-1792428105 No score

TuxCare security update for @react-router/serve (2 CVEs)

TuxCare rebuilt @react-router/serve to address 2 CVEs. Fixed in 7.5.1-tuxcare.1.

Record
CLSA-2026-1792428105
Updated
2026-11-02
OSVCLSA-2026-1792430029 No score

TuxCare security update for create-react-router (2 CVEs)

TuxCare rebuilt create-react-router to address 2 CVEs. Fixed in 7.5.1-tuxcare.1.

Record
CLSA-2026-1792430029
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
react-router
npm
7.0.0-pre.0 to 7.5.1
7.5.2
react-router
TuxCare:npm
From an advisory covering 2 CVEs
7.5.1-tuxcare.0 up to 7.5.1-tuxcare.1, plus listed versions
7.5.1
7.5.1-tuxcare.1
react-router-dom
TuxCare:npm
From an advisory covering 2 CVEs
7.5.1-tuxcare.0 up to 7.5.1-tuxcare.1, plus listed versions
7.5.1
7.5.1-tuxcare.1
@react-router/architect
TuxCare:npm
From an advisory covering 2 CVEs
7.5.1-tuxcare.0 up to 7.5.1-tuxcare.1, plus listed versions
7.5.1
7.5.1-tuxcare.1
@react-router/cloudflare
TuxCare:npm
From an advisory covering 2 CVEs
7.5.1-tuxcare.0 up to 7.5.1-tuxcare.1, plus listed versions
7.5.1
7.5.1-tuxcare.1
@react-router/express
TuxCare:npm
From an advisory covering 2 CVEs
7.5.1-tuxcare.0 up to 7.5.1-tuxcare.1, plus listed versions
7.5.1
7.5.1-tuxcare.1
@react-router/node
TuxCare:npm
From an advisory covering 2 CVEs
7.5.1-tuxcare.0 up to 7.5.1-tuxcare.1, plus listed versions
7.5.1
7.5.1-tuxcare.1
@react-router/remix-routes-option-adapter
TuxCare:npm
From an advisory covering 2 CVEs
7.5.1-tuxcare.0 up to 7.5.1-tuxcare.1, plus listed versions
7.5.1
7.5.1-tuxcare.1
@react-router/dev
TuxCare:npm
From an advisory covering 2 CVEs
7.5.1-tuxcare.0 up to 7.5.1-tuxcare.1, plus listed versions
7.5.1
7.5.1-tuxcare.1
@react-router/fs-routes
TuxCare:npm
From an advisory covering 2 CVEs
7.5.1-tuxcare.0 up to 7.5.1-tuxcare.1, plus listed versions
7.5.1
7.5.1-tuxcare.1
@react-router/serve
TuxCare:npm
From an advisory covering 2 CVEs
7.5.1-tuxcare.0 up to 7.5.1-tuxcare.1, plus listed versions
7.5.1
7.5.1-tuxcare.1
create-react-router
TuxCare:npm
From an advisory covering 2 CVEs
7.5.1-tuxcare.0 up to 7.5.1-tuxcare.1, plus listed versions
7.5.1
7.5.1-tuxcare.1
react-router
npm
7.0.0-pre.0 up to 7.5.2
7.5.2

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
PoC in GitHubpouriam23/Pre-render-data-spoofing-on-React-Router-framework-mode-CVE-2025-438652025-04-27

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-43865 is a high vulnerability (CVSS 8.2) in @tanstack React-router, published April 24, 2025. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 0.81%, the 57th percentile. Fixed in react-router 7.5.2.

References

MoveEnter Open