Read the docs
TI-2022-16461 Aliases CVE-2022-36036GHSA-rvgm-35jw-q628

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

Priority HIGH 67CWE-94Published · Updated

Key facts

Attack vector
Local
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-94.

Summary

mdx-mermaid provides plug and play access to Mermaid in MDX. There is a potential for an arbitrary javascript injection in versions less than 1.3.0 and 2.0.0-rc1. Modify any mermaid code blocks with arbitrary code and it will execute when the component is loaded by MDXjs. This vulnerability was patched in version(s) 1.3.0 and 2.0.0-rc2. There are currently no known workarounds.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00398 34th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed mdx-mermaid (sjwall): 1.3.0mdx-mermaid (npm): 1.3.0, 2.0.0-rc2

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
sjwallmdx-mermaidbefore 1.3.0; = 2.0.0-rc11.3.0Patch availableCNA
—mdx-mermaid (npm)before 1.3.01.3.0Patch availableGHSA-rvgm-35jw-q628
—mdx-mermaid (npm)2.0.0-rc1 to before 2.0.0-rc22.0.0-rc2Patch availableGHSA-rvgm-35jw-q628
  • mdx-mermaid Vendorsjwall Affected before 1.3.0; = 2.0.0-rc1 Fixed in 1.3.0 Patch available CNA
  • mdx-mermaid (npm) Vendor— Affected before 1.3.0 Fixed in 1.3.0 Patch available GHSA-rvgm-35jw-q628
  • mdx-mermaid (npm) Vendor— Affected 2.0.0-rc1 to before 2.0.0-rc2 Fixed in 2.0.0-rc2 Patch available GHSA-rvgm-35jw-q628

CPE configurations NVD · 2

CPEVersionsRoleVendor
cpe:2.3:a:mdx-mermaid_project:mdx-mermaid:*:*:*:*:*:node.js:*:*0.0.1 to before 1.3.0VulnerableMdx-mermaid Project
cpe:2.3:a:mdx-mermaid_project:mdx-mermaid:2.0.0:rc1:*:*:*:node.js:*:*2.0.0 rc1VulnerableMdx-mermaid Project
  • cpe:2.3:a:mdx-mermaid_project:mdx-mermaid:*:*:*:*:*:node.js:*:* Versions 0.0.1 to before 1.3.0 Vulnerable ·Mdx-mermaid Project
  • cpe:2.3:a:mdx-mermaid_project:mdx-mermaid:2.0.0:rc1:*:*:*:node.js:*:* Versions 2.0.0 rc1 Vulnerable ·Mdx-mermaid Project

Remediation

  • Fix · CNA mdx-mermaid (sjwall) Fixed in 1.3.0
  • Fix · GHSA-rvgm-35jw-q628 mdx-mermaid (npm) Fixed in 1.3.0 Advisory →
  • Fix · GHSA-rvgm-35jw-q628 mdx-mermaid (npm) Fixed in 2.0.0-rc2 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-36036
  2. 2026-10-03 Alias added: GHSA-rvgm-35jw-q628

References

Sources