CVE-2025-0725:
When libcurl is asked to perform automatic gzip decompression of
content-encoded HTTP responses...
7.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.44208%
CWE
Published
2/5/2025
Updated
5/13/2025
KEV Status
No
Technology
-
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability CVE-2025-0725 describes an integer overflow leading to a buffer overflow in libcurl when handling gzip decompression with zlib versions 1.2.0.3 or older.
The analysis of the provided commit information, particularly the fixing commit 76f83f0db23846e254d940ec7
, reveals the vulnerable code sections.
- The function
check_gzip_header
was responsible for parsing the gzip header in the code path for older zlib versions. An integer overflow in this function during length calculations (e.g., for extra fields) could corrupt the determined header length (hlen
). This function was entirely removed as part of the fix for the old zlib path. - The function
gzip_do_write
contained the logic to handle different zlib versions. For versions < 1.2.0.4, it usedcheck_gzip_header
. Ifhlen
was corrupted by an integer overflow incheck_gzip_header
,gzip_do_write
would use this incorrecthlen
to calculatez->avail_in
(the amount of data available for decompression). A miscalculatedavail_in
(e.g., a very large value due to integer wrap-around) would then be passed toinflate()
(viainflate_stream
), causing it to read out of bounds, resulting in a buffer overflow. The fixing commit removes the entire code path that supported these old zlib versions, including thecheck_gzip_header
function and the specific logic withingzip_do_write
that called it and subsequently set up the zlib stream forinflate_stream
. This directly points to these two functions (or the specific removed parts ofgzip_do_write
) as containing the vulnerability.