CVE-2020-14958 Insecure Permissions in Gogs
Attackers can set another user's email as primary due to missing ownership checks, potentially leading to account takeover.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-14958?
CVE-2020-14958 is a medium-severity missing authorization vulnerability in n/a, published on 21 Jun 2020. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
In Gogs 0.11.91, MakeEmailPrimary in models/user_mail.go lacks a "not the owner of the email" check.
Weakness: CWE-281
Which versions are affected by CVE-2020-14958?
3 open source packages ship an affected version, including gogs.io/gogs. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
gogs.io/gogs Go | All versions | 0.12.0 |
gogs.io/gogs Go | All versions | 0.12.0 |
gogs.io/gogs Go | All versions | 0.12.0 |
Products include Gogs Gogs.
How do I fix CVE-2020-14958?
Upgrade gogs.io/gogs to 0.12.0 or later.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2020-14958 being exploited?
There is no known exploitation of CVE-2020-14958 in the wild and no public exploit code.
Other vulnerabilities in n/a
Sources
Also known as GHSA-4c7m-vv47-7c69, GO-2022-0788.