CVE-2025-12029

8.0 HIGH

📋 TL;DR

This vulnerability allows unauthenticated attackers to inject malicious scripts into GitLab's Swagger UI interface, potentially enabling them to perform unauthorized actions on behalf of legitimate users. It affects all GitLab Community Edition and Enterprise Edition installations running vulnerable versions. The attack requires specific circumstances but could lead to account compromise or data manipulation.

💻 Affected Systems

Products:
  • GitLab Community Edition
  • GitLab Enterprise Edition
Versions: 15.11 to 18.4.5, 18.5 to 18.5.3, 18.6 to 18.6.1
Operating Systems: All platforms running GitLab
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all deployments with Swagger UI enabled (default in many configurations).

📦 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 account takeover, data exfiltration, or unauthorized administrative actions leading to full system compromise.

🟠

Likely Case

Session hijacking, unauthorized data access, or privilege escalation for targeted users.

🟢

If Mitigated

Limited impact with proper network segmentation and access controls, potentially only affecting isolated test environments.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Requires specific circumstances for successful exploitation but unauthenticated access lowers barrier.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 18.4.6, 18.5.4, or 18.6.2

Vendor Advisory: https://about.gitlab.com/releases/2025/12/10/patch-release-gitlab-18-6-2-released/

Restart Required: Yes

Instructions:

1. Backup your GitLab instance. 2. Update to GitLab 18.4.6, 18.5.4, or 18.6.2 depending on your current version. 3. Restart GitLab services. 4. Verify the update was successful.

🔧 Temporary Workarounds

Disable Swagger UI

all

Temporarily disable the Swagger UI interface to prevent exploitation.

Edit GitLab configuration to set 'swagger_ui_enabled: false' in gitlab.yml

Restrict API Access

all

Limit access to GitLab API endpoints using network controls.

Configure firewall rules to restrict access to GitLab API endpoints

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate GitLab instances from untrusted networks
  • Enable additional authentication requirements for API access and monitor for suspicious activity

🔍 How to Verify

Check if Vulnerable:

Check GitLab version via admin interface or command line. If version is between 15.11-18.4.5, 18.5.0-18.5.3, or 18.6.0-18.6.1, the system is vulnerable.

Check Version:

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

Verify Fix Applied:

Confirm GitLab version is 18.4.6, 18.5.4, or 18.6.2 or higher. Test Swagger UI functionality to ensure it's properly sanitizing inputs.

📡 Detection & Monitoring

Log Indicators:

  • Unusual API requests to Swagger endpoints
  • Multiple failed authentication attempts followed by successful API calls
  • Suspicious user agent strings in API logs

Network Indicators:

  • Unusual traffic patterns to GitLab API endpoints
  • Requests containing script injection patterns
  • External connections to Swagger UI from unexpected sources

SIEM Query:

source="gitlab" AND (uri_path="/api/swagger" OR uri_path="/explorer") AND (http_method="POST" OR http_method="PUT") AND status=200

🔗 References

📤 Share & Export