CVE-2022-2865
Description
A cross-site scripting issue has been discovered in GitLab CE/EE affecting all versions before 15.1.6, 15.2 to 15.2.4 and 15.3 prior to 15.3.2. It was possible to exploit a vulnerability in setting the labels colour feature which could lead to a stored XSS that allowed attackers to perform arbitrary actions on behalf of victims at client side.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A stored XSS in GitLab CE/EE via label color import allows attackers to perform arbitrary client-side actions.
Vulnerability
A stored cross-site scripting (XSS) vulnerability exists in GitLab CE/EE affecting all versions before 15.1.6, 15.2 to 15.2.4, and 15.3 prior to 15.3.2. The bug resides in the label color feature: when importing a project from GitHub, the label colors are not sanitized, allowing an attacker to inject malicious JavaScript that executes when a victim views the imported label [1].
Exploitation
Exploitation requires an attacker to set up a custom GitHub server that serves a repository with a crafted label color containing a JavaScript payload. The attacker then uses the GitLab API to import that repository into a GitLab project. The victim must have access to the project and view the label. The attacker needs to be able to initiate the import, which requires a GitLab personal access token with api scope [1].
Impact
Successful exploitation results in stored XSS on the client side. The attacker can perform arbitrary actions on behalf of the victim, including but not limited to exfiltration of session tokens, modification of page content, and performing actions as the victim within GitLab. Note that the vulnerability bypasses the Content Security Policy (CSP) [1].
Mitigation
GitLab has fixed the vulnerability in versions 15.3.2, 15.2.4, and 15.1.6 [1]. Users should upgrade to one of these patched versions immediately. No workaround is known for unpatched instances.
AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
3- Range: before 15.1.6, 15.2 to 15.2.4, 15.3 prior to 15.3.2
- Range: >=9.0, <15.1.6
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3News mentions
0No linked articles in our index yet.