Packages / react-router / Security
React Router: Arbitrary Constructor Injection via deserializeErrors() in React Router SSR Hydration
Affected releases · react-router
- 7.x7.0.0 – 7.17.0Fixed in 7.18.0
- 6.x6.4.0 – 6.30.6No fix on this line yet
On 7.x, the newest line:
npm install react-router@7.18.0Not affected
8.0.0 – 8.5.0
8 releases, latest
Affected
7.0.0 – 7.17.0
47 releases
Fixed
7.18.0 – 7.18.4
5 releases
Not affected
6.0.0 – 6.3.0
9 releases
Affected
6.4.0 – 6.30.6
61 releases
Is your project affected?
Paste your package.json, or type the range you declare for react-router. It is read in your browser and sent nowhere.
What happens
If application code allows attacker supplied input to overwrite certain aspects of errors caught by the SSR process, then it was possible for attacker to trigger unexpected constructor execution on the client which would trigger outbound network traffic. This is only possible with very specific (and unlikely) application layer code.
[!NOTE] This does not impact your application if you are using Declarative Mode. This only impacts Framework Mode and Data Mode applications doing manual SSR/hydration