{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-36036","id":"CVE-2022-36036","title":"Improper Control of Generation of Code ('Code Injection') in mdx-mermaid","description":"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.","descriptionLong":"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:10.000Z","updated":"2026-10-28T02:31:10.078242781Z","reserved":"2022-07-15T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":3.6,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","rating":"low","source":"GitHub_M"},"metrics":[{"version":"3.1","score":3.6,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","rating":"low","source":"GitHub_M"},{"version":"3.1","score":3.6,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","rating":"low","source":"github.com"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":3.6,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","rating":"low","source":"OSV"},{"version":"3.1","score":3.6,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","rating":"low","source":"GitHub"}],"rating":"low","products":["sjwall mdx-mermaid"],"affectedProducts":[{"vendor":"sjwall","product":"mdx-mermaid","defaultStatus":null,"versions":[{"status":"affected","version":"< 1.3.0"},{"status":"affected","version":"= 2.0.0-rc1"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"mdx-mermaid","purl":"pkg:npm/mdx-mermaid","ranges":["<1.3.0",">=2.0.0-rc1 <2.0.0-rc2"],"fixed":["1.3.0","2.0.0-rc2"],"advisory":"GHSA-rvgm-35jw-q628"}],"cwes":["CWE-94"],"aliases":["GHSA-rvgm-35jw-q628"],"references":[{"url":"https://github.com/sjwall/mdx-mermaid/security/advisories/GHSA-rvgm-35jw-q628","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Third Party Advisory","advisory","web"]},{"url":"https://github.com/sjwall/mdx-mermaid/commit/f2b99386660fd13316823529c3f1314ebbcdfd2a","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/36xxx/CVE-2022-36036.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-36036","tags":["advisory"]},{"url":"https://github.com/sjwall/mdx-mermaid","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00398,"epssPercentile":0.34711,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-36036","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-36036","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-36036","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-rvgm-35jw-q628","ok":true,"note":"GHSA-rvgm-35jw-q628"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-36036","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}