Miggo Logo

CVE-2023-52425:
libexpat through 2.5.0 allows a denial of service (resource consumption) because many full...

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.70574%
Published
2/4/2024
Updated
6/14/2024
KEV Status
No
Technology
-

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability (CVE-2023-52425) in libexpat is a denial of service caused by excessive resource consumption due to O(N^2) reparsing of large tokens that require multiple buffer fills. The core of the fix, introduced primarily in commit 9cdf9b8d77d5c2c2a27d15fb68dd3f83cafb45a1, involves creating a new static function callProcessor. This function wraps the actual call to the parser's internal processor (parser->m_processor) and implements a heuristic: it defers calling the processor if a partial token has been encountered multiple times without a significant increase in available data.

The functions XML_Parse, XML_ParseBuffer, and XML_ResumeParser are the public API functions that were modified in this commit to call callProcessor instead of directly invoking parser->m_processor. Therefore, these three functions, in their state before this patch, contained the vulnerable logic that allowed for the excessive reparsing. They are the entry points that would trigger the vulnerable behavior when processing specially crafted XML with large tokens. The vulnerability lies in how these functions previously managed the invocation of the core parsing logic, lacking a mechanism to prevent the repeated reparsing of the same data segments.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

li**xp*t t*rou** *.*.* *llows * **ni*l o* s*rvi** (r*sour** *onsumption) ****us* m*ny *ull r*p*rsin*s *r* r*quir** in t** **s* o* * l*r** tok*n *or w*i** multipl* *u***r *ills *r* n*****.

Reasoning

T** vuln*r**ility (*V*-****-*****) in li**xp*t is * **ni*l o* s*rvi** **us** *y *x**ssiv* r*sour** *onsumption *u* to O(N^*) r*p*rsin* o* l*r** tok*ns t**t r*quir* multipl* *u***r *ills. T** *or* o* t** *ix, intro*u*** prim*rily in *ommit ***********