Miggo Logo

CVE-2021-39391: Cross-site Scripting in Beego

6.1

CVSS Score
3.1

Basic Information

EPSS Score
0.47398%
Published
9/15/2021
Updated
12/7/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/beego/beego/v2go< 2.0.22.0.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability manifests in the request statistics display functionality of the admin panel. The URI path from HTTP requests is stored and later rendered unescaped in HTML templates. The controller method responsible for handling the 'Request Statistics' page view (likely in logs.go) would pass the raw URI to templates without adequate output encoding. This matches the XSS pattern described where URI input becomes executable script content when viewed by admins. The confidence is high as this is the standard pattern for Beego admin controllers and the vulnerability description explicitly implicates URI path handling in statistics display.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*ross Sit* S*riptin* (XSS) vuln*r**ility *xists in t** **min p*n*l in ****o v*.*.* vi* t** URI p*t* in *n *TTP r*qu*st, w*i** is **tiv*t** *y **ministr*tors vi*win* t** "R*qu*st St*tisti*s" p***.

Reasoning

T** vuln*r**ility m*ni**sts in t** r*qu*st st*tisti*s *ispl*y *un*tion*lity o* t** **min p*n*l. T** URI p*t* *rom *TTP r*qu*sts is stor** *n* l*t*r r*n**r** un*s**p** in *TML t*mpl*t*s. T** *ontroll*r m*t*o* r*sponsi*l* *or **n*lin* t** 'R*qu*st St*t