Miggo Logo

CVE-2022-32174: Gogs vulnerable to Cross-site Scripting

9.1

CVSS Score
3.1

Basic Information

EPSS Score
0.92677%
Published
10/11/2022
Updated
2/2/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
gogs.io/gogsgo>= 0.6.5, <= 0.12.10

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper sanitization of user-supplied data in the assignee selection component. The code at line 263 of gogs.js shows UI updates using .html() with user-controlled input (full_name). When an admin selects a malicious user as assignee, the unescaped JavaScript payload in the user's name field executes due to unsafe HTML insertion methods. This matches the PoC description where XSS in the assignee selection leads to privilege escalation.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

In *o*s, v*rsions v*.*.* t*rou** v*.**.** *r* vuln*r**l* to Stor** *ross-Sit* S*riptin* (XSS) t**t l***s to *n ***ount t*k*ov*r.

Reasoning

T** vuln*r**ility st*ms *rom improp*r s*nitiz*tion o* us*r-suppli** **t* in t** *ssi*n** s*l**tion *ompon*nt. T** *o** *t lin* *** o* `*o*s.js` s*ows UI up**t*s usin* `.*tml()` wit* us*r-*ontroll** input (*ull_n*m*). W**n *n **min s*l**ts * m*li*ious