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

Critical 9.3 Published Updated

Attackers can inject malicious JavaScript via unescaped user input in Beego's RenderForm function, leading to session hijacking or credential theft.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-30223?

CVE-2025-30223 is a critical cross-site scripting vulnerability in beego, published on 31 Mar 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Beego is an open-source web framework for the Go programming language. Prior to 2.3.6, a Cross-Site Scripting (XSS) vulnerability exists in Beego's RenderForm() function due to improper HTML escaping of user-controlled data. This vulnerability allows attackers to inject malicious JavaScript code that executes in victims' browsers, potentially leading to session hijacking, credential theft, or account takeover. The vulnerability affects any application using Beego's RenderForm() function with user-provided data. Since it is a high-level function generating an entire form markup, many developers would assume it automatically escapes attributes (the way most frameworks do). This vulnerability is fixed in 2.3.6.

Weakness: CWE-79

Which versions are affected by CVE-2025-30223?

6 open source packages ship an affected version, including github.com/beego/beego and github.com/beego/beego/v2. It affects 1 product.

PackageAffectedFixed in
github.com/beego/beego GoAll versionsNone
github.com/beego/beego GoAll versions to 1.12.14None
github.com/beego/beego GoAll versions to 1.12.14None
github.com/beego/beego/v2 GoAll versions2.3.6
github.com/beego/beego/v2 GoAll versions2.3.6
github.com/beego/beego/v2 GoAll versions2.3.6

Products include Beego Beego.

How do I fix CVE-2025-30223?

Upgrade to a fixed version.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2025-30223 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-30223 exists.

Sources

Also known as CLEANSTART-2025-JI63720, CLEANSTART-2025-YL37771, GHSA-2j42-h78h-q4fg, GO-2025-3585, MINI-pg45-9rcf-f6jm.

Is CVE-2025-30223 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free