Code Injection Affecting mdx-mermaid package, versions <1.3.0>=2.0.0-rc1 <2.0.0-rc2


Severity

Recommended
0.0
low
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.05% (20th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-MDXMERMAID-3009151
  • published30 Aug 2022
  • disclosed30 Aug 2022
  • creditsjwall

Introduced: 30 Aug 2022

CVE-2022-36036  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade mdx-mermaid to version 1.3.0, 2.0.0-rc2 or higher.

Overview

mdx-mermaid is a Display mermaid diagrams in mdx files.

Affected versions of this package are vulnerable to Code Injection due to improper input validation, which makes it possible to inject malicious code inside a code block of Mermaid.spec.tsx. Exploiting this vulnerability is possible when a component is loaded by MDXjs.

References

CVSS Scores

version 3.1