Skip to main content

md-editor-v3 CVE-2026-84992

| EUVDEUVD-2026-83198 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-09-18 GitHub_M GHSA-3rm2-h79c-8qw6
6.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft fenced-code with malicious language info-string
  2. Delivery
    Submit Markdown to host app that persists it
  3. Exploit
    Bypass XSSPlugin via renderer-generated attribute injection
  4. Execution
    Victim renders content in MdPreview
  5. Impact
    Execute JavaScript in application origin

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires (1) a host application that embeds md-editor-v3's MdPreview/MdEditor component at version <= 6.5.3, (2) that application accepting attacker-influenced Markdown, and (3) a victim rendering that Markdown (UI:R) - for stored XSS the application must also persist the Markdown and serve it to other users. Notably, having the shipped XSSPlugin enabled does NOT mitigate this, because the filter only inspects existing html_block/html_inline tokens and cannot see the renderer-generated HTML built from the fenced-code language value. The 'noHighlight: true' option only makes the PoC deterministic; the default highlighting path reaches the same unsafe return, so no special/non-default highlighting configuration is needed. Limiting factors: the attacker cannot exploit a deployment that never renders untrusted third-party Markdown, and only self-XSS results if no other user views the content.

Impact

This is a legitimate but moderate-severity client-side XSS (CWE-79) whose real-world risk hinges on deployment context rather than raw exploitability. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N = 6.1 Medium) is internally consistent with the vulnerability: network-reachable, low complexity, no privileges on the vulnerable library, but requiring victim rendering (UI:R) and crossing into the browser security context (S:C). No EPSS score, no CISA KEV listing, and no independent/external exploit tracking are provided - however a fully working proof-of-concept payload IS published inside the GHSA advisory itself ('`x"><details/open/ontoggle=alert(document.domain)>'), so functional exploit code is effectively public. The most important nuance: the vendor scores PR:N because the md-editor-v3 library itself requires no authentication, but the ACTUAL attack surface depends entirely on the host application - whether it accepts and persists attacker-supplied Markdown determines if this is a self-XSS curiosity or a genuine stored-XSS vector against other users. Because md-editor-v3 is commonly embedded in comment systems, wikis, and note apps that store user Markdown, the stored-XSS path is realistic. Absence of EPSS/KEV signals reflects that this is a recently disclosed, non-mass-exploited library flaw, not that it is low-risk in an affected app - treat as a prompt-patch item for any application embedding this component and accepting untrusted Markdown.

Exploit ScenarioDerived

An attacker submits Markdown containing a fenced code block whose language 'info string' carries a break-out payload (e.g. '`x"><details/open/ontoggle=alert(document.domain)>'), which md-editor-v3 interpolates unescaped into the code element's class/language HTML attributes, bypassing the shipped XSSPlugin because that filter only inspects pre-existing html tokens, not renderer-generated HTML. When another user's browser renders the stored content via MdPreview, the injected handler fires JavaScript in the application origin. A working PoC is published in the GHSA advisory, so exploitation is straightforward once an app accepts and displays untrusted Markdown.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 18, 2026

Cross-site scripting in the MdPreview component of md-editor-v3 (versions up to and including 6.5.3) lets remote attackers execute JavaScript in the host application's origin by supplying Markdown that contains a crafted fenced-code language string, and because the host can persist that Markdown it escalates to stored XSS for every user who later views the content. User interaction is required - a victim must render the malicious Markdown - and the shipped XSSPlugin does not prevent exploitation, since it only filters existing html_block and html_inline tokens and cannot inspect the renderer-generated HTML that the highlight callback produces. Scored CVSS 3.1 6.1 (AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N); publicly available exploit code exists (a working payload is included in the upstream GHSA advisory), no confirmed active exploitation (no CISA KEV listing), and the vendor-released patch fixes the issue in version 6.5.4.

RemediationAI

Upgrade md-editor-v3 to 6.5.4 or later (npm install md-editor-v3@6.5.4, or npm install md-editor-v3@latest), which escapes the language value with md.utils.escapeHtml and quotes the language attribute in useMarkdownIt.ts; because the same commit also replaces innerHTML with textContent in useCopyCode.ts and escapes copy-button tips and editorId-derived values in the codetabs plugin, taking the full release is preferable to hand-porting the single-line change. Advisory: https://github.com/imzbf/md-editor-v3/security/advisories/GHSA-3rm2-h79c-8qw6; fix commit: https://github.com/imzbf/md-editor-v3/commit/2c07360420e74087f5bc63032ab155d93e0a0b10; patched release: https://github.com/imzbf/md-editor-v3/releases/tag/v6.5.4. If the dependency cannot be updated immediately, the effective compensating control is to normalize fenced-code info strings before they reach MdPreview or MdEditor - strip the language token or allowlist it with a strict pattern such as /^[A-Za-z0-9_+-]{1,32}$/, discarding anything containing quotes, angle brackets, equals signs or whitespace. The trade-off is that aliases, file-path-style labels and unusual language names used by your authors will silently lose syntax highlighting until the allowlist is widened. Do not rely on the shipped XSSPlugin, and do not rely on setting noHighlight: true: the advisory confirms the default highlighting path reaches the same unsafe return, so disabling highlighting provides no protection. Post-render sanitization of the previewed HTML with a library such as DOMPurify can strip the injected ontoggle/onerror handlers, but it must run on every render of untrusted content, adds a dependency and parsing cost, and can be bypassed if any code path renders the component output directly. Where untrusted Markdown must be displayed, isolate the preview in a sandboxed iframe on a separate origin without cross-origin scripting privileges, which keeps a successful payload away from session tokens, cookies and same-origin APIs at the cost of losing tight editor integration with the host page.

Affected VersionsENISA

md-editor-v3 < 6.5.4

Affected Packages

npm md-editor-v3 fix: 6.5.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

md-editor-v3 is a Vue 3 Markdown editor and preview component written in JSX and TypeScript, and it delegates parsing to markdown-it. In packages/MdEditor/layouts/Content/composition/useMarkdownIt.ts (around line 206), useMarkdownIt() registers a markdown-it highlight callback whose final return builds HTML from a template literal: <pre><code class="language-${language}" language=${language}>${codeSpan}</code></pre>. The language value is taken from the fenced code block info string and is concatenated into the class attribute and into an unquoted language attribute without escaping or quoting, so characters such as a double quote, '>' or '=' break out of the attribute context and let an attacker add event handlers (the advisory's payload uses ontoggle with a <details open> element). The library's XSSPlugin runs as a markdown-it plugin on the source tokens and only strips pre-existing html_block and html_inline tokens, so it never sees HTML that the renderer generates afterwards - a filter-versus-renderer ordering gap rather than a total absence of sanitization. Both the highlighted and non-highlighted rendering paths hit the same unsafe return, so no special configuration is needed; the advisory only uses noHighlight: true to make reproduction deterministic. The underlying weakness is CWE-79, improper neutralization of input during web page generation (cross-site scripting), and it maps to the affected range in the CPE cpe:2.3:a:imzbf:md-editor-v3:*:*:*:*:*:*:*:*. The upstream fix at commit 2c07360420e74087f5bc63032ab155d93e0a0b10 introduces md.utils.escapeHtml(language) and quotes the language attribute; the same commit hardens adjacent surfaces by switching copy-button writes from innerHTML to textContent in useCopyCode.ts and by escaping copy tips and DOM-safe-encoding the editorId used in the codetabs plugin.

Know when Vue gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 6.1 MEDIUM

Network-delivered Markdown, no privileges in the library, victim must render it (UI:R), and script executes in the browser origin outside the parser's control (S:C) with typical XSS C:L/I:L.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

1
Patch available
Sep 18, 2026 - 18:03 EUVD

DescriptionCVE.org

md-editor-v3 is a Markdown editor for Vue 3 developed in JSX and TypeScript. Prior to 6.5.4, MdPreview's useMarkdownIt() highlight callback in packages/MdEditor/layouts/Content/composition/useMarkdownIt.ts inserts a fenced-code language value into class and language HTML attributes without escaping or consistently quoting it. Both highlighted and non-highlighted rendering paths reach this return value, while XSSPlugin filters only existing html_block and html_inline tokens before rendering and therefore cannot inspect the renderer-generated HTML. An attacker who can supply Markdown can use crafted fenced-code metadata to execute JavaScript in the application origin when a victim renders it, including as stored cross-site scripting when the host persists the Markdown. This issue is fixed in version 6.5.4

Threat Intelligence Overview

EPSS Score
0.2%
Top 86% exploitable
Prevalence
Medium
popular Vue 3 Markdown editor npm package, common but not ubiquitous
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy