CVE-2022-31108Injection in Project Mermaid

Severity
6.1MEDIUMNVD
EPSS
0.2%
top 53.49%
CISA KEV
Not in KEV
Exploit
No known exploits
Timeline
PublishedJun 28
Latest updateJul 5

Description

Mermaid is a JavaScript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. An attacker is able to inject arbitrary `CSS` into the generated graph allowing them to change the styling of elements outside of the generated graph, and potentially exfiltrate sensitive information by using specially crafted `CSS` selectors. The following example shows how an attacker can exfiltrate the contents of an input field by brut

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NExploitability: 2.8 | Impact: 2.7

Affected Packages4 packages

NVDmermaid_project/mermaid8.0.09.1.3
npmmermaid_project/mermaid8.0.09.1.2
CVEListV5mermaid-js/mermaid>= 8.0.0, < 9.1.3

Patches

🔴Vulnerability Details

3
GHSA
Possible inject arbitrary `CSS` into the generated graph affecting the container HTML2022-07-05
OSV
Possible inject arbitrary `CSS` into the generated graph affecting the container HTML2022-07-05
OSV
CVE-2022-31108: Mermaid is a JavaScript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex d2022-06-28

📋Vendor Advisories

1
Debian
CVE-2022-31108: node-mermaid - Mermaid is a JavaScript based diagramming and charting tool that uses Markdown-i...2022