Miggo Logo

CVE-2020-28483: Inconsistent Interpretation of HTTP Requests in github.com/gin-gonic/gin

7.1

CVSS Score
3.1

Basic Information

EPSS Score
0.57512%
Published
6/23/2021
Updated
5/20/2024
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/gin-gonic/gingo< 1.7.71.7.7

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The primary vulnerability stemmed from ClientIP() in context.go which directly trusted X-Forwarded-For headers without validating the remote IP against trusted proxies. The GitHub patch shows this function was modified to add proxy validation through the new RemoteIP() and validateHeader() methods. The prepareTrustedCIDRs function in gin.go also contributed as improper initialization (fixed in #2675) could leave trust checks incomplete. The high confidence for ClientIP is based on direct header handling changes in the fix commit, while prepareTrustedCIDRs gets medium confidence due to its role in proxy validation setup.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

W**n *in is *xpos** *ir**tly to t** int*rn*t, * *li*nt's IP **n ** spoo*** *y s*ttin* t** X-*orw*r***-*or *****r. T*is *****ts *ll v*rsions o* p**k*** *it*u*.*om/*in-*oni*/*in un**r *.*.*.

Reasoning

T** prim*ry vuln*r**ility st*mm** *rom *li*ntIP() in *ont*xt.*o w*i** *ir**tly trust** X-*orw*r***-*or *****rs wit*out v*li**tin* t** r*mot* IP ***inst trust** proxi*s. T** *it*u* p*t** s*ows t*is *un*tion w*s mo*i*i** to *** proxy v*li**tion t*rou**