{"id":"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.","aliases":["GHSA-rvgm-35jw-q628"],"modified":"2026-08-12T03:51:21.540570988Z","published":"2022-08-29T17:20:10Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-94"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/36xxx/CVE-2022-36036.json"},"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"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/sjwall/mdx-mermaid","events":[{"introduced":"b2cffa6b1e12ae84c608d5aff9f458af8c26b24b"},{"fixed":"1db4bdd2aa81ab7d9849eed2b0a5e9fe4ae93f31"},{"introduced":"5e16e68d1e52a1471fd17ef492eb19b842601d9e"},{"fixed":"f2b99386660fd13316823529c3f1314ebbcdfd2a"}],"database_specific":{"source":["CPE_RANGE","CPE_STRING","REFERENCES"],"cpe":["cpe:2.3:a:mdx-mermaid_project:mdx-mermaid:*:*:*:*:*:node.js:*:*","cpe:2.3:a:mdx-mermaid_project:mdx-mermaid:2.0.0:rc1:*:*:*:node.js:*:*"],"extracted_events":[{"introduced":"0.0.1"},{"fixed":"1.3.0"},{"introduced":"2.0.0-rc1"},{"last_affected":"2.0.0-rc1"}]}}],"versions":["2.0.0-rc1","= 2.0.0-rc1","v1.2.3","v1.2.2","v1.2.1","v1.2.0","v1.1.1","v1.1.0","v1.0.0","0.0.1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-36036.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N"}]}