Miggo Logo

CVE-2025-54575: SixLabors ImageSharp Has Infinite Loop in GIF Decoder When Skipping Malformed Comment Extension Blocks

5.3

CVSS Score
3.1

Basic Information

EPSS Score
-
Published
7/30/2025
Updated
7/30/2025
KEV Status
No
Technology
TechnologyC#

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
SixLabors.ImageSharpnuget< 2.1.112.1.11
SixLabors.ImageSharpnuget>= 3.0.0, < 3.1.113.1.11

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability described is a denial-of-service caused by an infinite loop in the GIF decoder of SixLabors.ImageSharp when processing a malformed GIF file. The advisory points to two commits that patch this issue. Analysis of these commits reveals that the changes are concentrated in the ReadComments method within the GifDecoderCore.cs file. The patch adds a check to handle cases where the end of the stream is reached unexpectedly while reading a comment block. This prevents the infinite loop that occurs when the code tries to skip a malformed comment block. Therefore, the SixLabors.ImageSharp.Formats.Gif.GifDecoderCore.ReadComments function is identified as the vulnerable function. During exploitation, a call to this function with a malicious GIF file would trigger the infinite loop, making it a key indicator in a runtime profile.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t * sp**i*lly *r**t** *I* *il* *ont*inin* * m*l*orm** *omm*nt *xt*nsion *lo*k (wit* * missin* *lo*k t*rmin*tor) **n **us* t** Im***S**rp *I* ***o**r to *nt*r *n in*init* loop w*il* *tt*mptin* to skip t** *lo*k. T*is l***s to * **ni*l o* s*rv

Reasoning

T** vuln*r**ility **s*ri*** is * **ni*l-o*-s*rvi** **us** *y *n in*init* loop in t** *I* ***o**r o* SixL**ors.Im***S**rp w**n pro**ssin* * m*l*orm** *I* *il*. T** **visory points to two *ommits t**t p*t** t*is issu*. *n*lysis o* t**s* *ommits r*v**ls