Miggo Logo

CVE-2025-30223: Beego allows Reflected/Stored XSS in Beego's RenderForm() Function Due to Unescaped User Input

9.3

CVSS Score
3.1

Basic Information

EPSS Score
0.13127%
Published
3/31/2025
Updated
3/31/2025
KEV Status
No
Technology
TechnologyGo

Technical Details

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

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from renderFormField's direct insertion of unescaped user inputs into HTML attributes and content. The patch modifies this exact function to add template.HTMLEscapeString calls, confirming it was the vulnerable point. This function is called by RenderForm() to generate form fields, making it the primary location where malicious input would be processed during exploitation. The test cases demonstrate XSS payloads would flow through this function unescaped in vulnerable versions.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry * *ross-Sit* S*riptin* (XSS) vuln*r**ility *xists in ****o's `R*n**r*orm()` *un*tion *u* to improp*r *TML *s**pin* o* us*r-*ontroll** **t*. T*is vuln*r**ility *llows *tt**k*rs to inj**t m*li*ious J*v*S*ript *o** t**t *x**ut*s in vi*tims'

Reasoning

T** vuln*r**ility st*ms *rom `r*n**r*orm*i*l*`'s *ir**t ins*rtion o* un*s**p** us*r inputs into *TML *ttri*ut*s *n* *ont*nt. T** p*t** mo*i*i*s t*is *x**t `*un*tion` to *** `t*mpl*t*.*TML*s**p*Strin*` **lls, *on*irmin* it w*s t** vuln*r**l* point. T*