CVE-2024-5257

4.9 MEDIUM

📋 TL;DR

A privilege escalation vulnerability in GitLab allows Developer users with the 'admin_compliance_framework' custom role to modify group namespace URLs. This could enable unauthorized changes to group settings or facilitate phishing attacks. All GitLab CE/EE instances with affected versions are impacted.

💻 Affected Systems

Products:
  • GitLab Community Edition
  • GitLab Enterprise Edition
Versions: 17.0 to 17.0.3, 17.1 to 17.1.1
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires Developer users with 'admin_compliance_framework' custom role, which may not be default but can be assigned.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker could redirect legitimate group URLs to malicious sites, enabling phishing campaigns or disrupting legitimate group access.

🟠

Likely Case

Unauthorized modification of group namespace URLs leading to confusion, broken links, or minor disruption.

🟢

If Mitigated

Minimal impact if proper role-based access controls and URL validation are enforced.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires authenticated Developer access with specific custom role.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 17.0.4, 17.1.2

Vendor Advisory: https://gitlab.com/gitlab-org/gitlab/-/issues/463149

Restart Required: Yes

Instructions:

1. Backup GitLab instance. 2. Update to GitLab 17.0.4 or 17.1.2 using package manager. 3. Restart GitLab services. 4. Verify update with 'gitlab-rake gitlab:env:info'.

🔧 Temporary Workarounds

Remove custom role permissions

linux

Temporarily revoke 'admin_compliance_framework' custom role from Developer users.

sudo gitlab-rails runner "User.where(role: 'Developer').each { |u| u.update(custom_role_permissions: u.custom_role_permissions.reject { |p| p == 'admin_compliance_framework' }) }"

🧯 If You Can't Patch

  • Review and restrict custom role assignments to minimize Developer privileges.
  • Monitor logs for unauthorized URL modification attempts and implement alerting.

🔍 How to Verify

Check if Vulnerable:

Check GitLab version with 'sudo gitlab-rake gitlab:env:info' and verify if between 17.0-17.0.3 or 17.1-17.1.1.

Check Version:

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

Verify Fix Applied:

Confirm version is 17.0.4 or 17.1.2+ and test that Developers with custom role cannot modify group namespace URLs.

📡 Detection & Monitoring

Log Indicators:

  • Audit logs showing group namespace URL modifications by Developer users
  • Unauthorized access attempts to compliance framework settings

Network Indicators:

  • Unexpected redirects from GitLab group URLs
  • Changes in group namespace patterns

SIEM Query:

source="gitlab" AND (event="group_namespace_update" OR action="modify_url") AND user_role="Developer"

🔗 References

📤 Share & Export