CVE-2020-9329
Gogs vulnerability analysis and mitigation

Overview

Gogs through version 0.11.91 contains a race condition vulnerability in the internal/db/repo.go file that allows attackers to bypass the administrator-specified repository creation policy. The vulnerability was discovered and disclosed on February 21, 2020 (NVD).

Technical details

The vulnerability stems from a race condition in the NumRepos field update process, which is not handled in a thread-safe manner. The issue occurs because the row is not locked during repository creation checks, allowing multiple concurrent requests to bypass the MaxCreationLimit restriction. The vulnerability has been assigned a CVSS v3.1 base score of 5.9 (Medium) with the vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N (NVD, GitHub Issue).

Impact

When exploited, this vulnerability allows attackers to create more repositories than the administrator-specified limit, potentially leading to resource exhaustion and violation of organizational policies (GitHub Issue).

Mitigation and workarounds

The suggested solutions include implementing optimistic locking for the NumRepos field in the User struct or redesigning the system to count repositories directly from the repository table instead of maintaining a counter in the user table (GitHub Issue).

Additional resources


SourceThis report was generated using AI

Related Gogs vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2024-56731CRITICAL9.8
  • GogsGogs
  • gogs.io/gogs
NoYesJun 24, 2025
CVE-2024-44625HIGH8.8
  • GogsGogs
  • gogs
NoYesNov 15, 2024
CVE-2025-8110HIGH8.7
  • GogsGogs
  • gogs
YesNoDec 10, 2025
CVE-2024-55947HIGH8.7
  • GogsGogs
  • gogs
NoYesDec 23, 2024
CVE-2024-54148HIGH8.7
  • GogsGogs
  • gogs.io/gogs
NoYesDec 23, 2024

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management