Miggo Logo

CVE-2019-10752: SQL Injection in sequelize

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.61609%
Published
10/25/2019
Updated
9/11/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
sequelizenpm< 4.44.34.44.3
sequelizenpm>= 5.0.0, < 5.15.15.15.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from three key points: 1) The MySQL query generator's custom JSON path handling used unsafe string concatenation. 2) MariaDB's implementation had similar vulnerable path formatting logic. 3) The abstract query generator's path processing for JSON queries (jsonPathExtractionQuery) didn't properly handle numeric subpaths, allowing injection through crafted path components. The commit diff shows these functions were modified in the patch, and the exploitation example demonstrates SQL injection through path manipulation in sequelize.json().

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*****t** v*rsions o* `s*qu*liz*` *r* vuln*r**l* to SQL Inj**tion. T** *un*tion `s*qu*liz*.json()` in*orr**tly *orm*tt** su* p*t*s *or JSON qu*ri*s, w*i** *llows *tt**k*rs to inj**t SQL st*t*m*nts *n* *x**ut* *r*itr*ry SQL qu*ri*s i* us*r input is p*s

Reasoning

T** vuln*r**ility st*ms *rom t*r** k*y points: *) T** MySQL qu*ry **n*r*tor's *ustom JSON p*t* **n*lin* us** uns*** strin* *on**t*n*tion. *) M*ri***'s impl*m*nt*tion *** simil*r vuln*r**l* p*t* *orm*ttin* lo*i*. *) T** **str**t qu*ry **n*r*tor's p*t*