Miggo Logo

GHSA-m4gq-x24j-jpmf: Prototype pollution vulnerability found in Mermaid's bundled version of DOMPurify

7

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
Published
10/22/2024
Updated
10/23/2024
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
mermaidnpm<= 10.9.210.9.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

T** *ollowin* *un*l** *il*s wit*in t** M*rm*i* NPM p**k*** *ont*in * *un*l** v*rsion o* *OMPuri*y t**t is vuln*r**l* to *ttps://*it*u*.*om/*ur***/*OMPuri*y/s**urity/**visori*s/**S*-mm*x-*mjr-r***, pot*nti*lly r*sultin* in *n XSS *tt**k. T*is *****ts

Reasoning

T** vuln*r**ility st*ms *rom M*rm*i*'s *un*l** `*OMPuri*y` v*rsion **in* <*.*.*. T** root **us* is `*OMPuri*y`'s `s*nitiz*()` *un*tion **ilin* to prop*rly **n*l* prototyp* pollution v**tors t*rou** n*st** *TML *l*m*nts *n* improp*r **pt* ****kin*. W*