CVE-2026-53666

React Router: Arbitrary Constructor Injection via deserializeErrors() in React Router SSR Hydration

Published Jul 27, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
Description
React Router is a router for React. In versions 6.4.0 through 7.17.0, if application code was written in a way that allows attacker-supplied input to overwrite certain aspects of errors caught by the SSR process, then it was possible for an attacker to trigger unexpected constructor execution on the client, which would in turn trigger an outbound network request. This is only possible with very specific (and unlikely) application-layer code. Note that this does not impact an application if it is using Declarative Mode. It only impacts Framework Mode and Data Mode applications that perform manual SSR/hydration. This issue has been fixed in version 7.18.0.

Analysis

AI-generated

Technical impact

React Router's SSR hydration function deserializeErrors() accepted error payloads that were later deserialized on the client. The impact of this flaw is that if application code allows an attacker to inject custom data into the error object, the deserialization could call a constructor that was not intended, leading to an arbitrary outbound network request. Based on the description, it is inferred that this scenario requires sophisticated manipulation of server‑side error handling, which is unlikely in most deployments. Nevertheless, the flaw permits an attacker to trigger unintended client‑side execution and could be used for data exfiltration or malicious redirects. The core weakness is code injection via deserialization (CWE‑470).

Affected Systems

Customers deploying remix‑run's React Router between versions 6.4.0 and 7.17.0 in Framework Mode or Data Mode with manual server‑side rendering are vulnerable. Declarative Mode builds are unaffected. The fix was introduced in 7.18.0. Based on the description, it is inferred that the vulnerability only manifests in applications that perform manual SSR/hydration in Framework or Data Mode, while Declarative Mode builds remain unaffected.

Risk and Exploitability

The CVSS score of 6.1 places this vector at medium severity. The EPSS score is less than 1%, indicating a very low likelihood of exploitation. The vulnerability is not currently listed in CISA's KEV catalog. Exploitation requires the attacker to subvert the application’s error‑handling logic to supply a crafted payload that will reach the React Router SSR layer, which suggests the likelihood of real‑world attacks is relatively low. Based on the description, it is inferred that an attacker must possess the ability to influence the server‑side error handling to inject a crafted error payload; such a condition is atypical in normal operation. Nevertheless, the presence of a constructor injection mechanism means that a successful exploit can result in unintended network calls from the client.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade React Router to version 7.18.0 or later.
  • Sanitize or otherwise prevent attacker‑supplied data from being injected into error objects during server‑side rendering.
  • Switch to Declarative Mode or re‑architect applications that use manual SSR to eliminate exposure of deserializeErrors.

Generated by OpenCVE AI on August 3, 2026 at 15:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-337j-9hxr-rhxg React Router: Arbitrary Constructor Injection via deserializeErrors() in React Router SSR Hydration
History
Type Values Removed Values Added
Weaknesses CWE-502
References
Metrics threat_severity

None

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Remix-run
Remix-run react-router
Vendors & Products Remix-run
Remix-run react-router
Type Values Removed Values Added
Description React Router is a router for React. In versions 6.4.0 through 7.17.0, if application code was written in a way that allows attacker-supplied input to overwrite certain aspects of errors caught by the SSR process, then it was possible for an attacker to trigger unexpected constructor execution on the client, which would in turn trigger an outbound network request. This is only possible with very specific (and unlikely) application-layer code. Note that this does not impact an application if it is using Declarative Mode. It only impacts Framework Mode and Data Mode applications that perform manual SSR/hydration. This issue has been fixed in version 7.18.0.
Title React Router: Arbitrary Constructor Injection via deserializeErrors() in React Router SSR Hydration
Weaknesses CWE-470
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-470

    Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')

  • CWE-502

    Deserialization of Untrusted Data

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 28, 2026, 3:19 PM
Reserved
Jun 9, 2026, 8:50 PM
Status
Analyzed
Published
Jul 27, 2026, 10:17 PM
Modified
Oct 24, 2026, 1:10 PM
Severity
Moderate
Public date
Jul 27, 2026, 9:14 PM