CVE-2024-12379

6.5 MEDIUM

📋 TL;DR

This vulnerability allows attackers to cause denial of service in GitLab by creating unbounded symbols via the scopes parameter in Personal Access Tokens. All GitLab CE/EE instances running affected versions are vulnerable. The attack impacts availability by consuming system resources.

💻 Affected Systems

Products:
  • GitLab Community Edition
  • GitLab Enterprise Edition
Versions: 14.1 to 17.6.4, 17.7 to 17.7.3, 17.8 to 17.8.1
Operating Systems: All supported platforms
Default Config Vulnerable: ⚠️ Yes
Notes: All deployments including self-managed, cloud, and containerized installations are affected if running vulnerable versions.

📦 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

Complete GitLab service outage requiring restart, potentially causing extended downtime and data loss if persistent attacks continue.

🟠

Likely Case

Degraded performance and intermittent service interruptions affecting all users until the attack stops or system is restarted.

🟢

If Mitigated

Minimal impact with proper rate limiting, monitoring, and quick response to anomalous token creation patterns.

🌐 Internet-Facing: HIGH - GitLab instances exposed to the internet are directly accessible to attackers without authentication requirements.
🏢 Internal Only: MEDIUM - Internal attackers or compromised accounts could still exploit this, but attack surface is reduced.

🎯 Exploit Status

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

Exploitation requires ability to create Personal Access Tokens, which typically requires user authentication. Attack is simple to execute once authenticated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 17.6.5, 17.7.4, 17.8.2

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

Restart Required: Yes

Instructions:

1. Backup your GitLab instance. 2. Update to patched version: 17.6.5, 17.7.4, or 17.8.2. 3. Restart GitLab services. 4. Verify the update was successful.

🔧 Temporary Workarounds

Restrict Personal Access Token Creation

all

Temporarily disable or restrict creation of new Personal Access Tokens to prevent exploitation.

# Edit GitLab configuration to restrict token creation
# In gitlab.rb: gitlab_rails['personal_access_tokens_enabled'] = false

Implement Rate Limiting

all

Add rate limiting for Personal Access Token creation endpoints.

# Configure rate limiting in gitlab.rb:
gitlab_rails['rate_limiting_enabled'] = true
gitlab_rails['rate_limiting_requests_per_period'] = 10
gitlab_rails['rate_limiting_period_in_seconds'] = 60

🧯 If You Can't Patch

  • Monitor Personal Access Token creation logs for unusual patterns and block suspicious IPs
  • Implement network-level controls to restrict access to GitLab token creation endpoints

🔍 How to Verify

Check if Vulnerable:

Check GitLab version via admin interface or run: sudo gitlab-rake gitlab:env:info | grep 'Version:'

Check Version:

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

Verify Fix Applied:

Confirm version is 17.6.5, 17.7.4, or 17.8.2 or higher. Test Personal Access Token creation with malformed scopes parameter.

📡 Detection & Monitoring

Log Indicators:

  • Unusually high rate of Personal Access Token creation
  • Errors related to symbol creation or memory allocation
  • API requests with malformed scopes parameter

Network Indicators:

  • Spike in POST requests to /api/v4/personal_access_tokens endpoint
  • Unusual traffic patterns from single IPs creating multiple tokens

SIEM Query:

source="gitlab" AND ("personal_access_token" OR "/api/v4/personal_access_tokens") AND status=200 | stats count by src_ip

🔗 References

📤 Share & Export