{"id":"CVE-2022-36036","published":"2022-08-29T17:20:10Z","modified":"2025-04-22T17:41:03Z","title":"Improper Control of Generation of Code ('Code Injection') in mdx-mermaid","vendor":"sjwall","product":"mdx-mermaid","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.6,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00398,"percentile":0.34942,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/sjwall/mdx-mermaid/security/advisories/GHSA-rvgm-35jw-q628","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/sjwall/mdx-mermaid/commit/f2b99386660fd13316823529c3f1314ebbcdfd2a","tags":["x_refsource_MISC"]}],"priority":{"score":9.5,"factors":[{"name":"EPSS percentile","points":6.99},{"name":"CVSS severity","points":2.52}]},"vendorSlug":"sjwall","affectedVersions":[{"vendor":"sjwall","product":"mdx-mermaid","versions":["< 1.3.0","= 2.0.0-rc1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-22T15:44:51.517210Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"mdx-mermaid","vulnerableRanges":["<1.3.0",">=2.0.0-rc1, <2.0.0-rc2"],"patched":["1.3.0","2.0.0-rc2"],"from":["GHSA-rvgm-35jw-q628"],"provenance":"source"}],"euvd":{"id":"EUVD-2022-6624","exploited":false,"provenance":"source"}}