CVE-2023-5106

8.2 HIGH

📋 TL;DR

This vulnerability in GitLab EE Ultimate allows attackers to impersonate users in CI/CD pipelines through direct transfer group imports. Attackers could execute unauthorized pipeline jobs with elevated privileges. Affects GitLab EE Ultimate installations running vulnerable versions.

💻 Affected Systems

Products:
  • GitLab EE Ultimate
Versions: 13.12 to 16.2.7, 16.3.0 to 16.3.4, 16.4.0
Operating Systems: All platforms running GitLab
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects GitLab EE with Ultimate license. Community Edition and lower-tier EE licenses are not affected.

📦 What is this software?

Gitlab by Gitlab

GitLab is a complete DevOps platform providing source code management, CI/CD pipelines, security scanning, container registry, and collaboration tools used by millions of developers and thousands of enterprises worldwide. As both a cloud-hosted SaaS offering (GitLab.com) and self-managed software, G...

Learn more about Gitlab →

Gitlab by Gitlab

GitLab is a complete DevOps platform providing source code management, CI/CD pipelines, security scanning, container registry, and collaboration tools used by millions of developers and thousands of enterprises worldwide. As both a cloud-hosted SaaS offering (GitLab.com) and self-managed software, G...

Learn more about Gitlab →

Gitlab by Gitlab

GitLab is a complete DevOps platform providing source code management, CI/CD pipelines, security scanning, container registry, and collaboration tools used by millions of developers and thousands of enterprises worldwide. As both a cloud-hosted SaaS offering (GitLab.com) and self-managed software, G...

Learn more about Gitlab →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could execute arbitrary code in CI pipelines, access sensitive data, deploy malicious code to production, or compromise the entire GitLab instance through pipeline execution.

🟠

Likely Case

Unauthorized access to CI/CD pipelines allowing execution of malicious jobs, potential data exfiltration, and privilege escalation within the GitLab environment.

🟢

If Mitigated

Limited impact with proper access controls, but still potential for unauthorized pipeline execution if attackers gain initial access.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires some level of access to perform group imports. Exploitation involves manipulating group import functionality.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 16.2.8, 16.3.5, 16.4.1

Vendor Advisory: https://gitlab.com/gitlab-org/security/gitlab/-/issues/980

Restart Required: Yes

Instructions:

1. Backup GitLab instance. 2. Update to patched version: 16.2.8, 16.3.5, or 16.4.1. 3. Restart GitLab services. 4. Verify update with version check.

🔧 Temporary Workarounds

Disable group imports

linux

Temporarily disable direct transfer group imports to prevent exploitation

gitlab-rails console
ApplicationSetting.first.update(group_import_enabled: false)

🧯 If You Can't Patch

  • Implement strict access controls on group import functionality
  • Monitor and audit all CI/CD pipeline executions for unauthorized activity

🔍 How to Verify

Check if Vulnerable:

Check GitLab version: if running 13.12-16.2.7, 16.3.0-16.3.4, or 16.4.0 with Ultimate license, you are vulnerable.

Check Version:

sudo gitlab-rake gitlab:env:info | grep 'GitLab Version'

Verify Fix Applied:

Verify version is 16.2.8, 16.3.5, or 16.4.1 or higher. Test group import functionality to ensure proper user validation.

📡 Detection & Monitoring

Log Indicators:

  • Unauthorized group import attempts
  • CI pipeline executions from unexpected users
  • Failed authentication attempts during group transfers

Network Indicators:

  • Unusual API calls to group import endpoints
  • Suspicious CI/CD job executions

SIEM Query:

source="gitlab" AND ("group_import" OR "direct_transfer") AND status="success"

🔗 References

📤 Share & Export