CVE-2022-36036
HIGH 7.8CVSS 3.1Improper Control of Generation of Code ('Code Injection') in mdx-mermaid
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
- 29 Aug 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-94
- Also known as
- GHSA-rvgm-35jw-q628
- Sources
- NVDJSONOSV GHSA-rvgm-35jw-q628JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | LOW 3.6 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | LOW 3.6 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | mdx-mermaid_project | mdx-mermaidcpe:2.3:a:mdx-mermaid_project:mdx-mermaid:*:*:*:*:*:node.js:*:* |
>= 0.0.1, < 1.3.0 | 1.3.0 |
| NVD | mdx-mermaid_project | mdx-mermaidcpe:2.3:a:mdx-mermaid_project:mdx-mermaid:2.0.0:rc1:*:*:*:node.js:*:* |
= 2.0.0 | |
| OSV | npm | mdx-mermaid | < 1.3.0 | 1.3.0 |
| OSV | npm | mdx-mermaid | >= 2.0.0-rc1, < 2.0.0-rc2 | 2.0.0-rc2 |
References
- https://github.com/sjwall/mdx-mermaid/commit/f2b99386660fd13316823529c3f1314ebbcdfd2a · Patch, Third Party Advisory, WEB
- https://github.com/sjwall/mdx-mermaid/security/advisories/GHSA-rvgm-35jw-q628 · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-36036 · ADVISORY
- https://github.com/sjwall/mdx-mermaid · PACKAGE
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 29 Aug 2022)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 31 Aug 2022)