CVE-2023-2198
📋 TL;DR
This vulnerability allows attackers to cause denial of service (DoS) in GitLab instances by sending specially crafted payloads to the preview_markdown endpoint. It affects all GitLab Community Edition (CE) and Enterprise Edition (EE) installations within specified version ranges. The attack exploits inefficient regular expression processing to consume excessive server resources.
💻 Affected Systems
- GitLab Community Edition
- GitLab Enterprise Edition
📦 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 service unavailability due to resource exhaustion, potentially affecting all GitLab services including repositories, CI/CD pipelines, and user authentication.
Likely Case
Degraded performance or temporary service disruption for the affected GitLab instance, requiring restart or intervention to restore normal operation.
If Mitigated
Minimal impact with proper rate limiting, WAF rules, and updated versions preventing exploitation attempts.
🎯 Exploit Status
Exploitation requires authenticated access but the payload construction is straightforward. Public reports and HackerOne disclosure provide technical details.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 15.10.8, 15.11.7, 16.0.2
Vendor Advisory: https://gitlab.com/gitlab-org/cves/-/blob/master/2023/CVE-2023-2198.json
Restart Required: Yes
Instructions:
1. Backup your GitLab instance. 2. Update to GitLab 15.10.8, 15.11.7, or 16.0.2 depending on your current version track. 3. Follow GitLab upgrade documentation for your deployment method (Omnibus, Docker, Helm, etc.). 4. Restart GitLab services.
🔧 Temporary Workarounds
Rate Limiting
allImplement rate limiting on the preview_markdown endpoint to prevent repeated exploitation attempts
Configure in GitLab application settings or via reverse proxy (nginx/apache) rules
WAF Rule
allAdd Web Application Firewall rules to block suspicious patterns targeting the preview_markdown endpoint
Add regex pattern detection rules in your WAF configuration
🧯 If You Can't Patch
- Restrict access to the preview_markdown endpoint using network ACLs or authentication requirements
- Implement monitoring and alerting for unusual patterns of requests to the vulnerable endpoint
🔍 How to Verify
Check if Vulnerable:
Check GitLab version via admin interface or command: sudo gitlab-rake gitlab:env:info | grep 'GitLab version'
Check Version:
sudo gitlab-rake gitlab:env:info | grep 'GitLab version'
Verify Fix Applied:
Confirm version is 15.10.8, 15.11.7, or 16.0.2 or higher using same command
📡 Detection & Monitoring
Log Indicators:
- High CPU usage on GitLab server
- Multiple POST requests to /api/v4/markdown or similar preview endpoints
- Slow response times from GitLab services
Network Indicators:
- Unusual patterns of requests to markdown preview endpoints
- Repeated similar payloads to vulnerable endpoint
SIEM Query:
source="gitlab" AND (uri_path="/api/v4/markdown" OR uri_path LIKE "%/preview%") AND status>=500
🔗 References
- https://gitlab.com/gitlab-org/cves/-/blob/master/2023/CVE-2023-2198.json
- https://gitlab.com/gitlab-org/gitlab/-/issues/408273
- https://hackerone.com/reports/1947187
- https://gitlab.com/gitlab-org/cves/-/blob/master/2023/CVE-2023-2198.json
- https://gitlab.com/gitlab-org/gitlab/-/issues/408273
- https://hackerone.com/reports/1947187
- https://gitlab.com/gitlab-org/gitlab/-/issues/408273