CVE-2018-6341Facebook React
Medium 6.1 No auth needed
Follow: this CVE · Facebook · Facebook React We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- 3.4% probability of exploitation in 30 days · percentile 90
- Auth required
- No
- Published
- Dec 31, 2018
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
React applications which rendered to HTML using the ReactDOMServer API were not escaping user-supplied attribute names at render-time. That lack of escaping could lead to a cross-site scripting vulnerability. This issue affected minor releases 16.0.x, 16.1.x, 16.2.x, 16.3.x, and 16.4.x. It was fixed in 16.0.1, 16.1.2, 16.2.1, 16.3.3, and 16.4.2.
What to do
- Apply the vendor's security update for React.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | react-dom |
≥ 16.0.0 < 16.0.1 |
16.0.1 |
npm install react-dom@16.0.1 |
| npm | react-dom |
≥ 16.1.0 < 16.1.2 |
16.1.2 |
npm install react-dom@16.1.2 |
| npm | react-dom |
≥ 16.2.0 < 16.2.1 |
16.2.1 |
npm install react-dom@16.2.1 |
| npm | react-dom |
≥ 16.3.0 < 16.3.3 |
16.3.3 |
npm install react-dom@16.3.3 |
| npm | react-dom |
≥ 16.4.0 < 16.4.2 |
16.4.2 |
npm install react-dom@16.4.2 |
Per OSV / GitHub Advisories (GHSA-mvjj-gqq2-p4hw). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| react | ≥ 16.0.0 < 16.0.1 | |
| react | ≥ 16.1.0 < 16.1.2 | |
| react | ≥ 16.2.0 < 16.2.1 | |
| react | ≥ 16.3.0 < 16.3.3 | |
| react | ≥ 16.4.0 < 16.4.2 |
Official sources
References
Links published by the sources. Open them with care.
- reactjs.org Vendor Advisory
- twitter.com Vendor Advisory