LiveActive security incident?Get immediate response
CVE Record

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

@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.

MediumCVSS 6.5Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

This is a browser-side self-XSS in @github/paste-markdown before 0.3.4. A user must be tricked into copying malicious clipboard content and pasting it into an application using the library. The business risk is targeted data exposure in that user's browser session, not server compromise. Vendor source says 0.3.4 fixes it.

Executive priority

Treat as a targeted browser-session data exposure risk. Prioritize remediation where the vulnerable library appears in authenticated, sensitive, or administrative web workflows. Broad emergency response is not supported by the provided evidence.

Technical view

When pasted clipboard data includes table markup, vulnerable versions create a div and assign clipboard content to innerHTML without sanitization. That can execute JavaScript in the victim's browser after paste. CVSS 3.1 is 6.5, with network attack vector, low complexity, no privileges, required user interaction, and high confidentiality impact.

Likely exposure

Exposure is limited to web pages or products that include @github/paste-markdown versions before 0.3.4 and accept user paste actions. The source bundle does not identify other affected products or downstream applications.

Exploitation context

Sources describe social engineering: users copy text from a malicious website and paste it into an affected page. The source bundle marks KEV false and provides no evidence of active exploitation in the wild.

Researcher notes

The advisory attributes the issue to unsanitized innerHTML handling during paste processing. Validation should focus on dependency version, reachable paste surfaces, and whether sensitive session data is accessible in affected browser contexts. Do not assume impact beyond the library without product-specific evidence.

Mitigation direction

  • Upgrade @github/paste-markdown to version 0.3.4 or later.
  • Inventory frontend dependencies for @github/paste-markdown below 0.3.4.
  • Check vendor guidance and release notes before deploying dependency updates.
  • Review applications that transform pasted clipboard content into HTML.

Validation and detection

  • Inspect package lockfiles for @github/paste-markdown versions below 0.3.4.
  • Confirm affected pages use the upgraded library in built frontend assets.
  • Run existing paste-handling regression tests after dependency update.
  • Verify dependency scanning flags are cleared for CVE-2021-37700.
Prepared
Confidence
high
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-79: User-session and phishing behavior lookup

Client-side and session-facing weaknesses should be reviewed alongside initial-access and user-execution behaviors. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-37700 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
6.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
5Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
6.5CVSS 3.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N2.83.6Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

6.5Medium
CVSS 3.1 vector shape for CVE-2021-37700Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
githubpaste-markdown< 0.3.4Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-79 · source CWE mapping

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.