Miggo Logo

CVE-2022-31078: KubeEdge CloudCore Router memory exhaustion vulnerability

4.4

CVSS Score
3.1

Basic Information

EPSS Score
0.18911%
Published
7/11/2022
Updated
7/21/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/kubeedge/kubeedgego>= 1.11.0, < 1.11.11.11.1
github.com/kubeedge/kubeedgego>= 1.10.0, < 1.10.21.10.2
github.com/kubeedge/kubeedgego< 1.9.41.9.4

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from unrestricted response body reading in the REST handler. In Go implementations, ioutil.ReadAll() is commonly used for reading HTTP response bodies, and its use without size limits would directly cause memory exhaustion. The router module's REST handler (RestHandler.ServeHTTP) is the entry point for these requests, making it the logical location for this vulnerability. The description explicitly mentions the REST handler's response handling as the root cause, aligning with this pattern.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t T** *lou**or* Rout*r *o*s not impos* * limit on t** siz* o* r*spons*s to r*qu*sts m*** *y t** R*ST **n*l*r. *n *tt**k*r *oul* us* t*is w**kn*ss to m*k* * r*qu*st t**t will r*turn *n *TTP r*spons* wit* * l*r** *o*y *n* **us* *oS o* *lou**or

Reasoning

T** vuln*r**ility st*ms *rom unr*stri*t** r*spons* *o*y r***in* in t** R*ST **n*l*r. In *o impl*m*nt*tions, `ioutil.R****ll()` is *ommonly us** *or r***in* *TTP r*spons* *o*i*s, *n* its us* wit*out siz* limits woul* *ir**tly **us* m*mory *x**ustion.