{"id":"CVE-2022-36036","aliases":["GHSA-rvgm-35jw-q628"],"url":"https://o3.security/vulnerability/CVE-2022-36036","summary":"Improper Control of Generation of Code ('Code Injection') in mdx-mermaid","details":"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.","published":"2022-08-29T17:20:10Z","modified":"2026-08-12T03:51:21.540570988Z","cvss":{"score":3.6,"severity":"LOW","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"npm","name":"mdx-mermaid","fixedVersion":"1.3.0"},{"ecosystem":"npm","name":"mdx-mermaid","fixedVersion":"2.0.0-rc2"}],"fix":{"url":"https://github.com/sjwall/mdx-mermaid/commit/f2b99386660fd13316823529c3f1314ebbcdfd2a","label":"sjwall/mdx-mermaid@f2b9938"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/36xxx/CVE-2022-36036.json"},{"type":"ADVISORY","url":"https://github.com/sjwall/mdx-mermaid/security/advisories/GHSA-rvgm-35jw-q628"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-36036"},{"type":"FIX","url":"https://github.com/sjwall/mdx-mermaid/commit/f2b99386660fd13316823529c3f1314ebbcdfd2a"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:21.540570988Z"}}