Miggo Logo

CVE-2025-32025:
bep/imagemeta allows a potentially large memory allocation in PNG and WebP parsing

6.9

CVSS Score

Basic Information

EPSS Score
-
Published
4/9/2025
Updated
4/9/2025
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/bep/imagemetago< 0.11.00.11.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability description states that the buffer created for parsing metadata was unbounded, leading to potential large memory allocation. The provided commit ee0de9b029f4e82106729f69559f27c9a404229d directly addresses this. The changes in io.go introduce a maxBufSize constant (10MB) and modify the bufferedReader function. Specifically, the bufferedReader function, which is a method of streamReader, now checks if the requested length for the buffer exceeds maxBufSize. If it does, an error is returned, preventing the large allocation. Therefore, (*streamReader).bufferedReader was the function where the unbounded allocation could occur, making it the vulnerable function. The changes in imagemeta.go are related to error propagation from a goroutine and do not directly involve the memory allocation logic itself, though they are part of the same commit. The changes in imagemeta_test.go are for testing purposes.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t T** *u***r *r**t** *or p*rsin* m*t***t* *or PN* *n* W**P im***s w*s only *oun*** *y t**ir input **t* typ*, w*i** *oul* l*** to pot*nti*lly l*r** m*mory *llo**tion, *n* unr**son**ly *i** *or im*** m*t***t*. ***or* `v*.**.*`, I* you *i*n't

Reasoning

T** vuln*r**ility **s*ription st*t*s t**t t** *u***r *r**t** *or p*rsin* m*t***t* w*s un*oun***, l***in* to pot*nti*l l*r** m*mory *llo**tion. T** provi*** *ommit `****************************************` *ir**tly ***r*ss*s t*is. T** ***n**s in `io.