Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-8648 Overview
CVE-2024-8648 is a stored cross-site scripting (XSS) vulnerability [CWE-79] in GitLab Community Edition (CE) and Enterprise Edition (EE). The flaw affects all versions from 16.0 before 17.3.7, 17.4 before 17.4.4, and 17.5 before 17.5.2. An attacker can inject malicious JavaScript into Analytics Dashboards through a specially crafted URL. Execution occurs in the victim's browser session when the dashboard is rendered. GitLab released fixes in versions 17.3.7, 17.4.4, and 17.5.2 on November 13, 2024.
Critical Impact
Successful exploitation allows attackers to run arbitrary JavaScript in an authenticated GitLab user's browser, enabling session theft, UI redress, and actions on behalf of the victim within the GitLab application.
Affected Products
- GitLab CE/EE 16.0 through 17.3.6
- GitLab CE/EE 17.4 through 17.4.3
- GitLab CE/EE 17.5 through 17.5.1
Discovery Timeline
- 2024-11-13 - GitLab releases patched versions 17.3.7, 17.4.4, and 17.5.2
- 2024-11-14 - CVE-2024-8648 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-8648
Vulnerability Analysis
The vulnerability resides in the Analytics Dashboards component of GitLab CE/EE. User-controlled input provided through a crafted URL is rendered into the dashboard without sufficient sanitization or output encoding. When a victim loads the affected dashboard URL, the embedded script executes in the context of the GitLab origin. The attacker gains the ability to access session cookies accessible to script, perform API calls as the victim, and manipulate the DOM to deceive the user. Because the payload is reflected into stored dashboard content, repeat views of the same dashboard can repeatedly trigger execution for any authenticated user who visits it.
Root Cause
The root cause is improper neutralization of input during web page generation [CWE-79] in the Analytics Dashboards feature. The affected code paths accept URL-sourced parameters and emit them into the rendered dashboard without applying context-aware encoding or disallowing dangerous schemes such as javascript: URIs. The GitLab advisory specifically identifies the issue as stored XSS through a javascript: URL in Analytics Dashboards.
Attack Vector
Exploitation requires an attacker to craft a GitLab Analytics Dashboard URL containing a malicious payload and deliver it to an authenticated victim through phishing, chat, issue comments, or social engineering. The victim must interact with the link, which satisfies the user-interaction requirement. Because the vulnerability has a changed scope, the injected script executes within the GitLab web origin and can impact resources the victim can access across projects, groups, and administrative interfaces. See the GitLab Patch Release Announcement and the HackerOne Report #2683863 for additional technical context.
Detection Methods for CVE-2024-8648
Indicators of Compromise
- Analytics Dashboard URLs or stored dashboard configuration containing javascript: schemes or inline <script> fragments in query parameters.
- Unexpected outbound requests from GitLab user browsers to attacker-controlled domains originating from the GitLab origin.
- Audit log entries showing dashboard modifications or accesses by users immediately before suspicious API calls using those users' tokens.
Detection Strategies
- Review GitLab production logs and reverse-proxy access logs for requests to Analytics Dashboard endpoints containing URL parameters with javascript:, data:, onerror=, or encoded script tags.
- Correlate suspicious dashboard URL views with subsequent personal access token creation, SSH key additions, or privilege changes by the same session.
- Hunt for anomalous DOM-based requests via browser telemetry or Content Security Policy (CSP) violation reports if CSP is enforced.
Monitoring Recommendations
- Enable and ship GitLab audit events and production.log to a centralized analytics platform for query-driven hunting.
- Monitor for abnormal use of personal access tokens or session reuse from new IP addresses shortly after dashboard interactions.
- Alert on changes to Analytics Dashboard YAML definitions in project repositories that introduce URL fields with script-capable schemes.
How to Mitigate CVE-2024-8648
Immediate Actions Required
- Upgrade GitLab CE/EE to version 17.5.2, 17.4.4, or 17.3.7 or later immediately.
- Audit Analytics Dashboard configurations across all projects and groups for suspicious URL parameters or injected markup.
- Rotate personal access tokens, session tokens, and credentials for any user suspected of visiting a crafted dashboard URL during the exposure window.
Patch Information
GitLab released patched versions 17.5.2, 17.4.4, and 17.3.7 on November 13, 2024. The fix is documented in the GitLab Patch Release Announcement and tracked in the GitLab Issue Discussion. All self-managed GitLab administrators should apply the appropriate patch release for their deployment branch.
Workarounds
- Restrict access to Analytics Dashboards to trusted users until patching is complete.
- Enforce a strict Content Security Policy that disallows inline scripts and javascript: URIs to limit payload execution.
- Train users to avoid clicking Analytics Dashboard links received from untrusted sources and verify URL parameters before loading.
# Upgrade GitLab on Debian/Ubuntu to a patched release
sudo apt-get update
sudo apt-get install gitlab-ee=17.5.2-ee.0
# Verify the installed version
sudo gitlab-rake gitlab:env:info | grep -i version
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

