{"id":"CVE-2021-37700","published":"2021-08-12T20:45:13Z","modified":"2024-08-04T01:23:01Z","title":"Clipboard-based DOM-XSS","vendor":"GitHub","product":"paste-markdown","tier":"tail","description":{"text":"@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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0166,"percentile":0.77258,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/github/paste-markdown/security/advisories/GHSA-gpfj-4j6g-c4w9","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/github/paste-markdown/commit/32b7ea3f29ae8f256f9d19768387be42678ddf30","tags":["x_refsource_MISC"]},{"url":"https://github.com/github/paste-markdown/releases/tag/v0.3.4","tags":["x_refsource_MISC"]},{"url":"https://www.npmjs.com/package/%40github/paste-markdown","tags":["x_refsource_MISC"]}],"priority":{"score":20.0,"factors":[{"name":"EPSS percentile","points":15.45},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"github","affectedVersions":[{"vendor":"github","product":"paste-markdown","versions":["< 0.3.4"]}],"affected":[{"ecosystem":"npm","package":"@github/paste-markdown","vulnerableRanges":["<0.3.4"],"patched":["0.3.4"],"from":["GHSA-gpfj-4j6g-c4w9"],"provenance":"source"}],"summary":{"text":"The paste-markdown npm package from GitHub contains a DOM-based cross-site scripting flaw in its clipboard handling: when pasted clipboard content contains the string <table>, the library copies that content into a dynamically created div's innerHTML property without sanitization. An attacker who can get a user to copy text from a malicious website and paste it into a page using this library can cause JavaScript to execute in the victim's browser, requiring only user interaction with no authentication or network access to the target.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:16:09Z"},"euvd":{"id":"EUVD-2021-1726","exploited":false,"provenance":"source"}}