CVE-2024-2279

8.7 HIGH

📋 TL;DR

This vulnerability is a stored cross-site scripting (XSS) flaw in GitLab's autocomplete feature for issue references, affecting GitLab CE/EE versions 16.7 to 16.8.6, 16.9 to 16.9.4, and 16.10 to 16.10.2. It allows attackers to inject malicious scripts that execute in victims' browsers, potentially enabling unauthorized actions on behalf of users. Organizations using these vulnerable GitLab versions are at risk, especially if they have internet-facing instances.

💻 Affected Systems

Products:
  • GitLab CE
  • GitLab EE
Versions: 16.7 to 16.8.6, 16.9 to 16.9.4, 16.10 to 16.10.2
Operating Systems: All supported OS for GitLab
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all deployments using the autocomplete feature for issue references; 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

Attackers could steal session cookies, perform account takeovers, manipulate data, or execute arbitrary actions as authenticated users, leading to data breaches or system compromise.

🟠

Likely Case

Attackers exploit the XSS to hijack user sessions, deface content, or redirect users to malicious sites, causing reputational damage and potential data leakage.

🟢

If Mitigated

With proper input validation and output encoding, the risk is minimized to low, preventing script execution and limiting impact to minor disruptions.

🌐 Internet-Facing: HIGH, as internet-facing GitLab instances are directly accessible to attackers, increasing the likelihood of exploitation and broader impact.
🏢 Internal Only: MEDIUM, as internal instances reduce external attack surface but are still vulnerable to insider threats or compromised internal accounts.

🎯 Exploit Status

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

Exploitation requires crafting a malicious payload via the autocomplete feature; authenticated access may be needed depending on GitLab settings.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 16.8.7, 16.9.5, 16.10.3

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

Restart Required: Yes

Instructions:

1. Backup GitLab data. 2. Update GitLab to the patched version using the official upgrade guide. 3. Restart GitLab services to apply changes.

🔧 Temporary Workarounds

Disable Autocomplete Feature

all

Temporarily disable the autocomplete for issue references feature to mitigate the vulnerability.

Edit GitLab configuration to remove or comment out autocomplete settings; consult GitLab docs for specific steps.

🧯 If You Can't Patch

  • Implement strict Content Security Policy (CSP) headers to block inline scripts and reduce XSS impact.
  • Use web application firewalls (WAF) to filter malicious payloads targeting the autocomplete endpoint.

🔍 How to Verify

Check if Vulnerable:

Check GitLab version via command: `sudo gitlab-rake gitlab:env:info | grep 'GitLab Version'` and compare to affected ranges.

Check Version:

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

Verify Fix Applied:

After patching, verify version is 16.8.7, 16.9.5, or 16.10.3 using the same command and test autocomplete functionality for XSS.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to autocomplete endpoints with script tags or encoded payloads in logs.

Network Indicators:

  • HTTP traffic containing malicious JavaScript in autocomplete-related API calls.

SIEM Query:

Example: search for 'autocomplete' AND 'script' in web server logs with status 200.

🔗 References

📤 Share & Export