Skip to content
Fencer Vulns
low 3.6

CVE-2022-36036 json

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

published 2022-08-29 4 y ago modified 2026-06-17 4 mo ago also GHSA-rvgm-35jw-q628 , EUVD-2022-6624

cvss
3.6
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.4%
EPSS 0.4% chance of exploitation in 30 days, percentile 34%
public exploits
0
none known

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.

Patch / fix

  • npm mdx-mermaid 1.3.0, 2.0.0-rc2
  • mdx-mermaid_project mdx-mermaid 1.3.0

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
partial
Assessed
18 mo ago

Exploit prediction

0.40% chance of exploitation in the next 30 days, higher than 34% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/sjwall/mdx-mermaid/security/advisories/GHSA-rvgm-35jw-q628 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 3.6 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N
NVD 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHub 3.1 3.6 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N

Affected packages

ecosystem package affected fixed in
npm mdx-mermaid
<1.3.0
>=2.0.0-rc1, <2.0.0-rc2
1.3.0
2.0.0-rc2

Affected products

  • sjwall mdx-mermaid

Classification

Weakness
  • CWE-94 Improper Control of Generation of Code

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.