{"id":"GHSA-gpfj-4j6g-c4w9","revision":null,"records":[{"revision":"f1e783afbd094ed0b4048717d57ecf1d","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2021-37700","aliases":[],"title":"Clipboard-based DOM-XSS","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.","state":0,"publishedAt":"2021-08-12T20:45:13+00:00","modifiedAt":"2024-08-04T01:23:01.457+00:00","affected":[{"ecosystem":"Vendor product","name":"paste-markdown","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"paste-markdown\",\n                    \"vendor\": \"github\",\n                    \"versions\": [\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \"< 0.3.4\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"severity":"MEDIUM"}],"references":["https://github.com/github/paste-markdown/security/advisories/GHSA-gpfj-4j6g-c4w9","https://github.com/github/paste-markdown/commit/32b7ea3f29ae8f256f9d19768387be42678ddf30","https://github.com/github/paste-markdown/releases/tag/v0.3.4","https://www.npmjs.com/package/%40github/paste-markdown"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2021-37700","license":"CVE Program Terms of Use","key":"cve-program:CVE-2021-37700","identifiers":["CVE-2021-37700"]},"retained":false,"historicalAffected":[]},{"revision":"705dfbc457db45249385036da4f41cc6","observedAt":"2026-11-24T03:36:11.517+00:00","statement":{"source":"euvd","id":"EUVD-2021-1726","aliases":["CVE-2021-37700","GHSA-gpfj-4j6g-c4w9"],"title":"@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 dy…","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"severity":null}],"references":["https://github.com/github/paste-markdown/security/advisories/GHSA-gpfj-4j6g-c4w9","https://github.com/github/paste-markdown/commit/32b7ea3f29ae8f256f9d19768387be42678ddf30","https://github.com/github/paste-markdown/releases/tag/v0.3.4","https://www.npmjs.com/package/%40github/paste-markdown"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2021-1726","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Aug 12, 2021, 8:45:13 PM","dateUpdated":"Aug 4, 2024, 1:23:01 AM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2021-1726","identifiers":["EUVD-2021-1726","CVE-2021-37700","GHSA-gpfj-4j6g-c4w9"]},"retained":false,"historicalAffected":[]},{"revision":"4b535a740ca24bbca143e4efb35c1446","observedAt":"2026-10-24T18:17:33.371+00:00","statement":{"source":"nvd","id":"CVE-2021-37700","aliases":[],"title":"@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 dy…","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.","state":0,"publishedAt":"2021-08-12T21:15:09.173+00:00","modifiedAt":"2026-06-17T04:01:00.793+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"severity":"MEDIUM"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"severity":"MEDIUM"},{"system":"CVSS 2.0 · nvd@nist.gov · Primary","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"severity":"MEDIUM"}],"references":["https://github.com/github/paste-markdown/commit/32b7ea3f29ae8f256f9d19768387be42678ddf30","https://github.com/github/paste-markdown/releases/tag/v0.3.4","https://github.com/github/paste-markdown/security/advisories/GHSA-gpfj-4j6g-c4w9","https://www.npmjs.com/package/%40github/paste-markdown"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2021-37700","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-79"],"productCriteria":["cpe:2.3:a:paste-markdown_project:paste-markdown:*:*:*:*:*:node.js:*:*"],"sourceDates":{"published":"2021-08-12T21:15:09.173","lastModified":"2026-06-17T04:01:00.793"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2021-37700","identifiers":["CVE-2021-37700"]},"retained":false,"historicalAffected":[]},{"revision":"c259e70e4f5a46f3bc88b0ef026bc99a","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-gpfj-4j6g-c4w9","aliases":["CVE-2021-37700"],"title":"Clipboard-based DOM-XSS","description":"### Impact\n\nA self Cross-Site Scripting vulnerability exists in the @github/paste-markdown library. 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.\n\nThe following @github/paste-markdown code snippet is triggered when the user pastes something and the browser's clipboard data contains an entry whose content-type is **text/HTML**.\n\n```typescript\nfunction generateText(transfer: DataTransfer): string | undefined {\n  if (Array.from(transfer.types).indexOf('text/html') === -1) return\n\n  let html = transfer.getData('text/html')\n  if (!/<table/i.test(html)) return\n\n  html = html.replace(/<meta.*?>/, '')\n\n  const el = document.createElement('div')\n  el.innerHTML = html\n  const tables = el.querySelectorAll('table')\n\n  for (const table of tables) {\n    if (table.closest('[data-paste-markdown-skip]')) {\n      table.replaceWith(new Text(table.textContent || ''))\n    }\n    const formattedTable = tableMarkdown(table)\n    table.replaceWith(new Text(formattedTable))\n  }\n\n  return el.innerHTML\n}\n```\n\n### Patches\nA security patch was released in [version 0.3.4](https://github.com/github/paste-markdown/releases/tag/v0.3.4).\n\n### Workarounds\nA Content Security Policy that prevents `unsafe-inline` helps reduce the likelihood of this vulnerability being exploited in modern browsers.\n\n<!--\n### References\n_Are there any links users can visit to find out more?_\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [example link to repo](http://example.com)\n* Email us at [example email address](mailto:example@example.com)\n*\n-->\n","state":0,"publishedAt":"2021-08-12T20:42:17+00:00","modifiedAt":"2026-07-08T06:28:23.2807339+00:00","affected":[{"ecosystem":"npm","name":"@github/paste-markdown","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.3.4"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/github/paste-markdown/security/advisories/GHSA-gpfj-4j6g-c4w9","https://nvd.nist.gov/vuln/detail/CVE-2021-37700","https://github.com/github/paste-markdown/commit/32b7ea3f29ae8f256f9d19768387be42678ddf30","https://github.com/github/paste-markdown","https://github.com/github/paste-markdown/releases/tag/v0.3.4","https://www.npmjs.com/package/@github/paste-markdown"],"sourceUrl":"https://github.com/advisories/GHSA-gpfj-4j6g-c4w9","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-gpfj-4j6g-c4w9","identifiers":["GHSA-gpfj-4j6g-c4w9","CVE-2021-37700"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-25T14:28:46.1367144+00:00","complete":true,"records":1795,"lastAttemptAt":"2026-11-25T14:28:46.1367144+00:00","lastSuccessAt":"2026-11-25T14:28:51.9077546+00:00","error":null,"lastVerifiedAt":"2026-11-25T14:28:51.9080982+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-8d356adab43082cb10bb7c033ed58312cf2ad2f0fb10e0afdf27fc89fa361f3b-c8a5bbe81e5c97f1ef0204d9f424811c3ab0e015216b17be9cd9061ec365cc09","complete":true,"records":432153,"lastAttemptAt":"2026-11-25T15:28:37.3830721+00:00","lastSuccessAt":"2026-11-25T15:28:37.2582332+00:00","error":null,"lastVerifiedAt":"2026-11-25T15:28:37.3830721+00:00","snapshotPublishedAt":"2026-11-25T14:30:07+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-20a49458ceae49e394c48dea1e375753","complete":false,"records":13938,"lastAttemptAt":"2026-11-25T14:34:23.2072341+00:00","lastSuccessAt":"2026-11-25T14:34:23.203+00:00","error":"120 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-25T14:34:23.203+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13664,"expectedIdentifiers":13986,"failedIdentifiers":120},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-25T14:28:46.1367144+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-25T14:28:46.1367144+00:00","lastSuccessAt":"2026-11-25T14:28:52.1107389+00:00","error":null,"lastVerifiedAt":"2026-11-25T14:28:52.1107403+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-0706f4f26289468d8444f9f1b50f35d8","complete":true,"records":13950,"lastAttemptAt":"2026-11-25T14:29:34.8783794+00:00","lastSuccessAt":"2026-11-25T14:29:34.81+00:00","error":null,"lastVerifiedAt":"2026-11-25T14:29:34.81+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13986,"expectedIdentifiers":13986,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-70b1e3058f76fab20c77bb1c4924a4c57f7654dd208befb5b1f237e682d6ddca","complete":true,"records":10077,"lastAttemptAt":"2026-11-25T14:28:43.5224151+00:00","lastSuccessAt":"2026-11-25T11:46:59.5507764+00:00","error":null,"lastVerifiedAt":"2026-11-25T14:28:43.5224151+00:00","snapshotPublishedAt":"2026-11-25T11:03:15+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-25T15:28:37.4627555+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-25T15:28:37.4627555+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-5be533520b83c9bfaebc80695093f6f0d59feafc2a1eab94e91dd79d1bb9241b","complete":true,"records":3222,"lastAttemptAt":"2026-11-25T14:28:43.9301039+00:00","lastSuccessAt":"2026-11-25T11:47:03.6026853+00:00","error":null,"lastVerifiedAt":"2026-11-25T14:28:43.9301039+00:00","snapshotPublishedAt":"2026-11-25T11:18:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-13386314c41bf037eb8784b89525b249650641e645a6e70d1fe37f29e9ef714c","complete":true,"records":233128,"lastAttemptAt":"2026-11-25T15:28:44.4217768+00:00","lastSuccessAt":"2026-11-25T13:47:03.1039798+00:00","error":null,"lastVerifiedAt":"2026-11-25T14:28:43.327083+00:00","snapshotPublishedAt":"2026-11-25T13:33:45+00:00","importing":true,"stagedRecords":204000,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}