-
CVSS Score
-Basic Information
CVE ID
-
GHSA ID
-
EPSS Score
-
CWE
-
Published
-
Updated
-
KEV Status
-
Technology
-
The analysis of the provided patches clearly indicates that the vulnerability lies within the code function in the lib/handlers/code.js file. The commit that introduced the bug (6fc783ae) removed the logic that sanitized the node.lang property, instead using the raw value to construct the className. The fixing commit (ab3a7957) re-introduced sanitization by splitting the node.lang string by whitespace and only using the first resulting token. This prevents the injection of additional class names through character-encoded spaces. Therefore, the code function is the precise location of the vulnerability, as it is responsible for processing the user-controlled lang attribute and generating the vulnerable HTML.
codelib/handlers/code.js
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| mdast-util-to-hast | npm | >= 13.0.0, < 13.2.1 | 13.2.1 |
Ongoing coverage of React2Shell