CVE-2023-5654: React devtools core React Developer Tools Extension Improper Vulnerability
MODERATECVE-2023-5654 is a MODERATE (CVSS 6.5) react developer tools extension improper vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting React devtools core libraries in the npm ecosystem. The issue involves react developer tools extension improper authorization vulnerability. Remediation is available by upgrading affected packages to version 4.28.4.
CVE-2023-5654 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L).
How to Fix CVE-2023-5654
To remediate this vulnerability, upgrade all affected React devtools core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install react-devtools-core@4.28.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls react-devtools-core
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-5654, inspect your project dependencies using npm:
npm ls react-devtools-core
Analyze the terminal output to locate any version of React devtools core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.28.4), your application is affected.
Note: The npm ls react-devtools-core command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In React devtools core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-5654 Affected React devtools core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
react-devtools-core
|
npm |
< 4.28.4
|
4.28.4
|
References
Frequently Asked Questions
What is CVE-2023-5654?
Which React devtools core versions are affected?
What version fixes CVE-2023-5654?
Is react-devtools-core affected?
What is the CVSS score of CVE-2023-5654?
What CWE is associated with CVE-2023-5654?
How can I check npm dependencies for CVE-2023-5654?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rxrc-rgv4-jpvx",
"modified" : "2024-09-12T18:41:02Z",
"published" : "2023-10-19T15:31:08Z",
"aliases" : [ "CVE-2023-5654" ],
"summary" : "React Developer Tools extension Improper Authorization vulnerability",
"details" : "The React Developer Tools extension registers a message listener with window.addEventListener('message', <listener>) in a content script that is accessible to any webpage that is active in the browser. Within the listener is code that requests a URL derived from the received message via fetch(). The URL is not validated or sanitised before it is fetched, thus allowing a malicious web page to arbitrarily fetch URL’s via the victim's browser.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "react-devtools-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.28.4"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-5654"
}, {
"type" : "WEB",
"url" : "https://github.com/facebook/react/pull/27417"
}, {
"type" : "WEB",
"url" : "https://github.com/facebook/react/commit/09285d5a7f1c08bec09f44cec3d0518a603597fc"
}, {
"type" : "WEB",
"url" : "https://github.com/facebook/react/commit/94d5b5b2bf5204ebd289a113989c0e2c51b626ef"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/CalumHutton/1fb89b64409570a43f89d1fd3274b231"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/facebook/react"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-116", "CWE-285" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-10-20T22:26:13Z",
"nvd_published_at" : "2023-10-19T15:15:09Z"
}
}