Miggo Logo

CVE-2020-14958: Insecure Permissions in Gogs

5.3

CVSS Score
3.1

Basic Information

EPSS Score
0.37017%
Published
5/18/2021
Updated
1/9/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
gogs.io/gogsgo< 0.12.00.12.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The commit diff shows the function signature changed from MakeEmailPrimary() to MakeEmailPrimary(), with added UID validation. Before patch, there was no check that email.UID matches the requesting user's ID, enabling unauthorized primary email changes. This matches CWE-281's improper permission preservation description.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

In *o*s *.**.**, M*k**m*ilPrim*ry in mo**ls/us*r_m*il.*o l**ks * "not t** own*r o* t** *m*il" ****k.

Reasoning

T** *ommit *i** s*ows t** `*un*tion si*n*tur*` ***n*** *rom `M*k**m*ilPrim*ry()` to `M*k**m*ilPrim*ry()`, wit* ***** `UI* v*li**tion`. ***or* p*t**, t**r* w*s no ****k t**t `*m*il.UI*` m*t***s t** r*qu*stin* us*r's I*, *n**lin* un*ut*oriz** prim*ry *