CVE-2021-39944

7.1 HIGH

📋 TL;DR

This vulnerability allows GitLab users with developer role permissions to elevate their privileges to maintainer level when importing projects. It affects all GitLab Community Edition and Enterprise Edition installations running vulnerable versions. Attackers could gain unauthorized access to sensitive project settings and data.

💻 Affected Systems

Products:
  • GitLab Community Edition
  • GitLab Enterprise Edition
Versions: All versions from 11.0 to 14.3.5, 14.4.0 to 14.4.3, and 14.5.0 to 14.5.1
Operating Systems: All operating systems running GitLab
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all installations with developer role users who can import projects. No special configuration required.

📦 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 →

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

Developer role users gain maintainer privileges across imported projects, enabling them to modify project settings, delete repositories, access sensitive data, and potentially compromise the entire GitLab instance through privilege escalation chains.

🟠

Likely Case

Malicious or compromised developer accounts gain unauthorized maintainer access to projects they import, allowing them to modify project configurations, access protected branches, and potentially exfiltrate source code or sensitive data.

🟢

If Mitigated

With proper role-based access controls and monitoring, impact is limited to specific imported projects, allowing quick detection and remediation of unauthorized privilege changes.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated developer role access. The vulnerability is well-documented in public reports with technical details.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 14.3.6, 14.4.4, or 14.5.2

Vendor Advisory: https://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-39944.json

Restart Required: Yes

Instructions:

1. Backup your GitLab instance. 2. Update to GitLab 14.3.6, 14.4.4, or 14.5.2 depending on your current version track. 3. Restart GitLab services. 4. Verify the update was successful.

🔧 Temporary Workarounds

Restrict Project Import Permissions

linux

Temporarily disable project import functionality for developer role users until patching is complete.

# Edit GitLab configuration to restrict imports
# Set in gitlab.rb: gitlab_rails['gitlab_import_enabled'] = false
# Then run: gitlab-ctl reconfigure

🧯 If You Can't Patch

  • Implement strict monitoring of user role changes and project import activities
  • Review and audit all developer role users' activities, especially project imports and privilege changes

🔍 How to Verify

Check if Vulnerable:

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

Check Version:

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

Verify Fix Applied:

Confirm version is 14.3.6, 14.4.4, or 14.5.2 or higher. Test that developer role users cannot elevate privileges during project import.

📡 Detection & Monitoring

Log Indicators:

  • Unusual user role changes from developer to maintainer
  • Multiple project imports by same developer user
  • Audit events showing privilege escalation

Network Indicators:

  • Increased API calls to project import endpoints
  • Unusual patterns in GitLab API usage

SIEM Query:

source="gitlab" AND (event="user_role_change" OR event="project_import") AND user_role="developer"

🔗 References

📤 Share & Export