CVE-2023-52425:
libexpat through 2.5.0 allows a denial of service (resource consumption) because many full...
7.5
Basic Information
Technical Details
Vulnerability Intelligence
Miggo AI
Root 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.