GHSA-m4gq-x24j-jpmf: Prototype pollution vulnerability found in Mermaid's bundled version of DOMPurify
7
CVSS Score
3.1
Basic Information
CVE ID
-
GHSA ID
EPSS Score
-
CWE
Published
10/22/2024
Updated
10/23/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
mermaid | npm | <= 10.9.2 | 10.9.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from Mermaid's bundled DOMPurify
version being <3.1.3. The root cause is DOMPurify
's sanitize()
function failing to properly handle prototype pollution vectors through nested HTML elements and improper depth checking. While Mermaid's own code isn't directly vulnerable, the bundled dependency's sanitization function becomes the attack surface. The patch confirms this by updating DOMPurify
to a secure version without modifying Mermaid's own logic.