CVE-2021-37700: github paste-markdown Cross-site Scripting
Vulnerability summary
CVE-2021-37700 is a medium (CVSS 6.5) Cross-site Scripting vulnerability in github paste-markdown. EPSS estimates a 1.66% chance of exploitation in the next 30 days, higher than 76.3% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 12-08-2021PublishedVulnerability first disclosed.
- 04-08-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
4 scores · 3 sources · 2 versions- OSV · NpmEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
- NVDNIST6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NDiffers
EPSS trend
Probability
1.66%
Chance of exploitation in the next 30 days
Percentile
76%
Versus all other CVEs
30-day change
0.00 pp
From 1.66% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundPaste Markdown
Maturity: poc
Weaknesses
CWE · root causeAffected systems
@github1 product
- paste-markdown< 0.3.4
Github1 product
- paste-markdown< 0.3.4
Paste-markdown_project1 product
- paste-markdown< 0.3.4
3 vendors · 3 products
References
7 links- github.com/github/paste-markdown/security/advisories/GHSA-gpfj-4j6g-c4w9X Refsource CONFIRMWEBExploitThird Party Advisory
- github.com/github/paste-markdown/commit/32b7ea3f29ae8f256f9d19768387be42678ddf30X Refsource MISCWEBPatchThird Party Advisory
- github.com/github/paste-markdown/releases/tag/v0.3.4X Refsource MISCWEBRelease NotesThird Party Advisory
- www.npmjs.com/package/%40github/paste-markdownX Refsource MISC