Advisories
This weekExploitable · Confirmed

mdx-mermaid: Improper Control of Generation of Code ('Code Injection') in mdx-mermaid

There is evidence it can be used, or an emergency alert, without the proof that makes it urgent.

Does it affect what I run?

mdx-mermaid (npm)

Checked in your browser. The version you type is not sent anywhere.

Who is affected

  • mdx-mermaid (npm): every version, before 1.3.0
  • mdx-mermaid (npm): from 2.0.0-rc1, before 2.0.0-rc2

The fix

  • mdx-mermaid (npm) fixed in 1.3.0

    npm
    npm install mdx-mermaid@1.3.0
    pnpm
    pnpm add mdx-mermaid@1.3.0
    yarn
    yarn add mdx-mermaid@1.3.0
    bun
    bun add mdx-mermaid@1.3.0
    Check what is installed
    npm ls mdx-mermaid
    Paste into Cursor, Lovable or Claude Code
    Upgrade the npm dependency mdx-mermaid to 1.3.0 or the nearest later release, to fix CVE-2022-36036. Change only what the upgrade needs: the manifest, the lockfile, and any code that breaks because of it. Do not change anything else and do not run commands unrelated to this upgrade. Then run the tests, tell me what changed, and show me the diff before committing.
  • mdx-mermaid (npm) fixed in 2.0.0-rc2

    npm
    npm install mdx-mermaid@2.0.0-rc2
    pnpm
    pnpm add mdx-mermaid@2.0.0-rc2
    yarn
    yarn add mdx-mermaid@2.0.0-rc2
    bun
    bun add mdx-mermaid@2.0.0-rc2
    Check what is installed
    npm ls mdx-mermaid
    Paste into Cursor, Lovable or Claude Code
    Upgrade the npm dependency mdx-mermaid to 2.0.0-rc2 or the nearest later release, to fix CVE-2022-36036. Change only what the upgrade needs: the manifest, the lockfile, and any code that breaks because of it. Do not change anything else and do not run commands unrelated to this upgrade. Then run the tests, tell me what changed, and show me the diff before committing.

Fix commands generated from the advisory's versions. No model wrote them.

In plain words

Brief pending: here are the facts and the fix. The explanation in plain words follows when it has been written and checked.

Evidence

Timeline

  1. First published here, as "For your digest".
  2. Level changed from "For your digest" to "This week".
  3. Evidence added: CISA's assessment in the CVE record says a proof of concept is public. (CISA Vulnrichment (SSVC and KEV fields inside CVE records))