CVE-2022-36036 Improper Control of Generation of Code ('Code Injection') in mdx-mermaid
HighCVSS 7.8
EPSS 0.52%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
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.
Upgrade path
3 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| mdx-mermaid project mdx-mermaid | = 2.0.0-rc1; >= 0.0.1, < 1.3.0 | 1.3.0 | Fixed |
| npm mdx-mermaid(npm) | < 1.3.0; = 2.0.0-rc1; >= 2.0.0-rc1, < 2.0.0-rc2 | 1.3.0, 2.0.0-rc2 | Fixed |
| sjwall mdx-mermaid | = < 1.3.0; = = 2.0.0-rc1 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| npm mdx-mermaid(npm) | < 1.3.0 | 1.3.0 |
| npm mdx-mermaid(npm) | = 2.0.0-rc1 | No fix listed |
| sjwall mdx-mermaid | = < 1.3.0 | No fix listed |
| sjwall mdx-mermaid | = = 2.0.0-rc1 | No fix listed |
| mdx-mermaid project mdx-mermaid | >= 0.0.1, < 1.3.0 | 1.3.0 |
| mdx-mermaid project mdx-mermaid | = 2.0.0-rc1 | No fix listed |
| npm mdx-mermaid(npm) | >= 2.0.0-rc1, < 2.0.0-rc2 | 2.0.0-rc2 |
References
- github.com exploit third-party-advisory vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com patch third-party-advisory
- github.com
- github.com product