# CVE-2021-37700: Clipboard-based DOM-XSS

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/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): 1.66%, higher than 77% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-08-12T20:42:17.000Z
- Modified: 2026-07-08T06:28:23.280Z
- Also known as: GHSA-gpfj-4j6g-c4w9
- Weaknesses: CWE-79
- Assigned by: GitHub_M

## Description

@github/paste-markdown is an npm package for pasting markdown objects. A self Cross-Site Scripting vulnerability exists in the @github/paste-markdown before version 0.3.4. If the clipboard data contains the string `<table>`, a **div** is dynamically created, and the clipboard content is copied into its **innerHTML** property without any sanitization, resulting in improper execution of JavaScript in the browser of the victim (the user who pasted the code). Users directed to copy text from a malicious website and paste it into pages that utilize this library are affected. This is fixed in version 0.3.4. Refer the to the referenced GitHub Advisory for more details including an example exploit.

(As written by CVE List.)

## Affected

- github paste-markdown: < 0.3.4
- @github/paste-markdown (npm): before 0.3.4
- paste-markdown_project paste-markdown: before 0.3.4

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/github/paste-markdown/security/advisories/GHSA-gpfj-4j6g-c4w9> (exploit, third-party-advisory, web)
- <https://github.com/github/paste-markdown/commit/32b7ea3f29ae8f256f9d19768387be42678ddf30> (patch, third-party-advisory, web)
- <https://github.com/github/paste-markdown/releases/tag/v0.3.4> (release-notes, third-party-advisory, web)
- <https://www.npmjs.com/package/%40github/paste-markdown>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-37700> (advisory)
- <https://github.com/github/paste-markdown> (package)
- <https://www.npmjs.com/package/@github/paste-markdown> (web)

## Sources

- CVE List: [CVE-2021-37700](https://www.cve.org/CVERecord?id=CVE-2021-37700), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-gpfj-4j6g-c4w9](https://github.com/advisories/GHSA-gpfj-4j6g-c4w9), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-37700](https://nvd.nist.gov/vuln/detail/CVE-2021-37700), Public domain, modified 2026-06-17

---

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