# CVE-2021-31712: Cross-site Scripting in React Draft Wysiwyg

- Severity: Medium 5.4 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.79%, higher than 57% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-04-24T20:56:59.000Z
- Modified: 2026-06-17T03:52:10.473Z
- Also known as: GHSA-qcg2-h349-vwm3
- Weaknesses: CWE-79
- Assigned by: mitre

## Description

react-draft-wysiwyg (aka React Draft Wysiwyg) before 1.14.6 allows a javascript: URi in a Link Target of the link decorator in decorators/Link/index.js when a draft is shared across users, leading to XSS.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- react-draft-wysiwyg (npm): before 1.14.6
- react_draft_wysiwyg_project react_draft_wysiwyg: before 1.14.6

## Every score

- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 3.5 Low `AV:N/AC:M/Au:S/C:N/I:P/A:N`

## References

- <https://github.com/jpuri/react-draft-wysiwyg/issues/1102> (exploit, issue-tracking, third-party-advisory, web)
- <https://github.com/jpuri/react-draft-wysiwyg/pull/1104> (patch, third-party-advisory, web)
- <https://github.com/jpuri/react-draft-wysiwyg/commit/d2faeb612b53f10dff048de7dc57e1f4044b5380> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-31712> (advisory)

## Sources

- CVE List: [CVE-2021-31712](https://www.cve.org/CVERecord?id=CVE-2021-31712), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-qcg2-h349-vwm3](https://github.com/advisories/GHSA-qcg2-h349-vwm3), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-31712](https://nvd.nist.gov/vuln/detail/CVE-2021-31712), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-31712 · Whole record: https://cve.day/CVE-2021-31712.json · Rebuilt by cve.day 2026-11-25T22:58:01.027Z
