Miggo Logo

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

EPSS Score
0.44208%
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 AIMiggo AI

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

  1. 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.
  2. The function gzip_do_write contained the logic to handle different zlib versions. For versions < 1.2.0.4, it used check_gzip_header. If hlen was corrupted by an integer overflow in check_gzip_header, gzip_do_write would use this incorrect hlen to calculate z->avail_in (the amount of data available for decompression). A miscalculated avail_in (e.g., a very large value due to integer wrap-around) would then be passed to inflate() (via inflate_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 the check_gzip_header function and the specific logic within gzip_do_write that called it and subsequently set up the zlib stream for inflate_stream. This directly points to these two functions (or the specific removed parts of gzip_do_write) as containing the vulnerability.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

W**n li**url is *sk** to p*r*orm *utom*ti* *zip ***ompr*ssion o* *ont*nt-*n*o*** *TTP r*spons*s wit* t** `*URLOPT_****PT_*N*O*IN*` option, **usin* zli* *.*.*.* or ol**r**, *n *tt**k*r-*ontroll** int***r ov*r*low woul* m*k* li**url p*r*orm * *u***r ov

Reasoning

T** vuln*r**ility *V*-****-**** **s*ri**s *n int***r ov*r*low l***in* to * *u***r ov*r*low in li**url w**n **n*lin* *zip ***ompr*ssion wit* zli* v*rsions *.*.*.* or ol**r. T** *n*lysis o* t** provi*** *ommit in*orm*tion, p*rti*ul*rly t** *ixin* *omm