CVE-2021-22177
GitLab vulnerability analysis and mitigation

Overview

A Denial of Service (DoS) vulnerability was identified in gitlab-shell in GitLab CE/EE version 12.6.0 and above. The vulnerability, tracked as CVE-2021-22177, was discovered in 2021 and allows attackers to cause server resource utilization spikes through the gitlab-shell command (GitLab CVE, Debian Tracker).

Technical details

The vulnerability exists in the gitlab-shell component's handling of 2FA recovery codes. Specifically, when executing the '2farecoverycodes' command, gitlab-shell reads user confirmation input without proper size limitations. The issue is present in the twofactorrecover.go file, where user input is read directly into a variable without bounds checking. The vulnerability has a CVSS v3.1 score of 4.3 (MEDIUM) and a CVSS v2.0 score of 4.0 (MEDIUM) (NVD Results).

Impact

When exploited, the vulnerability can cause gitlab-shell to consume 100% CPU of one core and gradually increase memory usage over time. This can lead to a denial of service condition affecting the GitLab server's operations (GitLab Issue).

Mitigation and workarounds

The issue has been fixed in subsequent GitLab releases. For Debian systems, the fix is available in version 17.3.5-3 of the gitlab package (Debian Tracker).

Additional resources


SourceThis report was generated using AI

Related GitLab vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-12571HIGH7.5
  • GitLabGitLab
  • cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*
NoYesNov 26, 2025
CVE-2025-7449MEDIUM6.5
  • GitLabGitLab
  • cpe:2.3:a:gitlab:gitlab
NoYesNov 26, 2025
CVE-2025-12653MEDIUM6.5
  • GitLabGitLab
  • cpe:2.3:a:gitlab:gitlab
NoYesNov 26, 2025
CVE-2025-13611MEDIUM5.3
  • GitLabGitLab
  • cpe:2.3:a:gitlab:gitlab:*:*:*:*:community:*:*:*
NoYesNov 26, 2025
CVE-2025-6195MEDIUM4.3
  • GitLabGitLab
  • gitlab
NoYesNov 26, 2025

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