CVE-2023-3401
GitLab vulnerability analysis and mitigation

Overview

An issue was discovered in GitLab affecting all versions before 16.0.8, all versions starting from 16.1 before 16.1.3, and all versions starting from 16.2 before 16.2.2. The vulnerability allows an attacker to create repositories with malicious code by exploiting specially designed repository branch names (GitLab Security, NVD).

Technical details

The vulnerability stems from insufficient validation of branch names in GitLab's branch checking mechanism. The issue exists in the branch_check.rb file, where a regular expression %r{\A\h{40}(/|\z)} is used to evaluate branch name patterns. While the check prohibits branch names like 'abbebba53d99e36a1450934a8bf4352a7fecd4d8/main', attackers can bypass this restriction by adding a '-' character at the end of the hexadecimal string, resulting in 'abbebba53d99e36a1450934a8bf4352a7fecd4d8-/main'. The vulnerability has been assigned a CVSS v3.1 base score of 4.8 MEDIUM (Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N) (GitLab Issue, NVD).

Impact

When successfully exploited, this vulnerability allows attackers to create repositories containing malicious code. This could potentially lead to code execution on systems of users who clone or download these repositories (GitLab Security).

Mitigation and workarounds

The vulnerability has been patched in GitLab versions 16.0.8, 16.1.3, and 16.2.2. Organizations are strongly recommended to upgrade to these or later versions immediately. GitLab.com has already been updated with the patched version (GitLab Security).

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-7449MEDIUM6.5
  • GitLabGitLab
  • gitlab
NoYesNov 26, 2025
CVE-2025-12653MEDIUM6.5
  • GitLabGitLab
  • gitlab
NoYesNov 26, 2025
CVE-2024-9183MEDIUM6.4
  • GitLabGitLab
  • cpe:2.3:a:gitlab:gitlab
NoYesDec 05, 2025
CVE-2025-13611MEDIUM5.3
  • GitLabGitLab
  • cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*
NoYesNov 26, 2025
CVE-2025-6195MEDIUM4.3
  • GitLabGitLab
  • cpe:2.3:a:gitlab: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