CVE-2022-32174 Gogs - XSS

Critical 9.0 Published Updated

Attackers can inject malicious scripts into Gogs to steal user sessions and take over accounts.

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

What is CVE-2022-32174?

CVE-2022-32174 is a critical cross-site scripting vulnerability in gogs, published on 11 Oct 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

In Gogs, versions v0.6.5 through v0.12.10 are vulnerable to Stored Cross-Site Scripting (XSS) that leads to an account takeover.

Weakness: CWE-79

Which versions are affected by CVE-2022-32174?

3 open source packages ship an affected version, including gogs.io/gogs. It affects 1 product.

PackageAffectedFixed in
gogs.io/gogs GoFrom 0.6.5None
gogs.io/gogs GoFrom 0.6.5 to 0.12.10None
gogs.io/gogs GoFrom 0.6.5 to 0.12.10None

Products include Gogs Gogs.

How do I fix CVE-2022-32174?

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-2022-32174 being exploited?

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

Sources

Also known as CLEANSTART-2024-KF00050, GHSA-mcjj-2fvq-mc3r, GO-2022-1060.

Is CVE-2022-32174 in your software?

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

Check your SBOMs for free