Cross-Site Scripting (XSS) in md-editor-v3 (CVE-2026-84992)
Summary
Cross-site scripting in md-editor-v3 (CVE-2026-84992). Risk of unauthorized operations or information disclosure. Exploitable via MdPreview. Mitigation: upgrade to 6.5.4 or later.
Original description
The description as published by the source.
Summary
MdPreview interpolates a fenced-code language into HTML attributes without escaping it. A crafted info string therefore executes JavaScript even when the shipped XSSPlugin is enabled.
Details
useMarkdownIt() (packages/MdEditor/layouts/Content/composition/useMarkdownIt.ts:206) registers a highlight callback whose final return inserts language into both class="language-${language}" and an unquoted language=${language} attribute without escaping. Both highlighting paths reach this return. XSSPlugin() filters only existing html_block and html_inline tokens before rendering, so it cannot inspect this renderer-generated HTML.
PoC
The Vue application enables the shipped XSSPlugin and renders attacker-controlled Markdown. noHighlight: true only makes reproduction deterministic; the default highlighting path reaches the same unsafe return. Use this as src/main.js:
import { createApp, h } from 'vue';
import { MdPreview, XSSPlugin, config } from 'md-editor-v3';
config({ markdownItPlugins: p => [...p, { type: 'xss', plugin: XSSPlugin, options: {} }] });
const markdown = '```x">\nSAFE\n```';
createApp({ render: () => h(MdPreview,
{ editorId: 'poc', modelValue: markdown, noHighlight: true })
}).mount('#app');
Create and run the app, replacing src/main.js when indicated:
npm create vite@latest poc -- --template vue
cd poc
npm install
npm install md-editor-v3@6.5.3
# Replace src/main.js with the code above.
npm run dev…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-84992 has been found in md-editor-v3.
Attackers can target a specific entry point like MdPreview over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 6.1/10.
What to do: upgrade md-editor-v3 to 6.5.4 or later.
If unsure, ask your IT team or search "md-editor-v3 CVE-2026-84992" on the vendor's site.
CVE-2026-84992 (md-editor-v3) — CWE-79 / CVSS v3 6.1
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: MdPreview / XSSPlugin / highlight / language
Patched: 6.5.4 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Cross-site scripting (XSS) (CWE-79) exists in md-editor-v3. Attackers reach the vulnerable code path via MdPreview without authentication.
Check the vendor advisory for the affected versions of md-editor-v3. Attack surface: MdPreview / XSSPlugin / highlight / language.
Severity: Medium (CVSS 6.1/10). Risk of unauthorized operations or information disclosure.
Update to 6.5.4.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'md-editor-v3' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'md-editor-v3' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
md-editor-v3を grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade md-editor-v3 to 6.5.4ステージング環境で 6.5.4 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- web github.com
- web github.com
- web github.com
- web github.com