CVE-2026-16627 Overview
CVE-2026-16627 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 19.2 before 19.2.2. GitLab improperly sanitizes HTML content rendered in a Continuous Integration (CI) job modal. An authenticated user holding developer-role permissions can inject malicious HTML that executes in another user's browser session. Under specific conditions, this behavior enables privilege escalation across trust boundaries. GitLab remediated the issue in the 19.2.2 patch release.
Critical Impact
A developer-role account can escalate privileges by injecting HTML that renders unsanitized in the CI job modal, compromising the confidentiality and integrity of a higher-privileged victim's session.
Affected Products
- GitLab Community Edition (CE) versions 19.2 through 19.2.1
- GitLab Enterprise Edition (EE) versions 19.2 through 19.2.1
- GitLab CE/EE 19.2.2 and later (fixed)
Discovery Timeline
- 2026-08-12 - CVE-2026-16627 published to the National Vulnerability Database (NVD)
- 2026-08-13 - Last updated in NVD database
Technical Details for CVE-2026-16627
Vulnerability Analysis
The vulnerability resides in GitLab's rendering pipeline for the CI job modal. HTML content displayed in the modal is not properly sanitized before rendering in the browser. An authenticated user with developer-role permissions can supply crafted input containing HTML or script payloads. When another user opens the affected modal, the payload executes in that user's authenticated browser context.
Because the scope changes from the attacker's session to the victim's session, the attacker can perform actions and read data available to the higher-privileged victim. This transforms a client-side injection flaw into a server-side privilege escalation. Successful exploitation requires user interaction, specifically that a privileged victim views the poisoned CI job modal.
Root Cause
The root cause is improper neutralization of input during web page generation [CWE-79]. GitLab's server-side rendering of CI job metadata fails to escape or filter HTML entities before serializing them into the modal DOM. Trusted output-encoding routines that apply across most GitLab surfaces were not consistently applied to this specific modal component.
Attack Vector
Exploitation proceeds over the network against an authenticated attacker session. A developer-role user submits crafted content that is stored and later rendered in the CI job modal. When a maintainer, owner, or administrator opens the modal on the affected project, the injected script runs in their browser. The attacker can then issue authenticated API calls, exfiltrate session artifacts, or modify project resources under the victim's identity.
No verified proof-of-concept code has been published. Refer to the HackerOne Security Report #3880796 and the GitLab Work Item Overview for coordinated disclosure details.
Detection Methods for CVE-2026-16627
Indicators of Compromise
- CI job names, job logs, or job metadata fields containing HTML tags such as <script>, <img onerror=>, <iframe>, or encoded variants
- Unexpected outbound requests from browsers of GitLab maintainers or administrators to attacker-controlled domains shortly after opening a CI job modal
- New personal access tokens, SSH keys, or role changes created by privileged accounts without a corresponding user-initiated workflow
Detection Strategies
- Inspect GitLab application logs and database records for CI job attributes containing HTML control characters submitted by developer-role accounts
- Correlate production_json.log entries for /api/v4/projects/*/jobs with subsequent privileged API calls originating from the same browser session
- Review audit events for privilege changes, token creation, and repository modifications performed by maintainers immediately after viewing a CI pipeline
Monitoring Recommendations
- Enable GitLab audit events for token creation, role changes, and CI/CD variable modifications
- Forward GitLab logs to a centralized analytics platform and alert on HTML injection patterns in job payloads
- Monitor Content Security Policy (CSP) violation reports from GitLab web sessions for blocked inline script executions
How to Mitigate CVE-2026-16627
Immediate Actions Required
- Upgrade all self-managed GitLab CE and EE instances running 19.2, 19.2.1 to version 19.2.2 or later
- Audit developer-role accounts for suspicious CI job submissions since the 19.2 release
- Rotate personal access tokens and session cookies for maintainers and administrators who accessed CI job modals on projects with untrusted contributors
Patch Information
GitLab released the fix in version 19.2.2. Apply the update as described in the GitLab Patch Release Note. GitLab.com SaaS instances are patched by the vendor. Self-managed operators must upgrade the Omnibus package, Helm chart, or source installation to 19.2.2.
Workarounds
- Restrict developer-role membership on projects where privileged users routinely view CI job modals until the patch is applied
- Enforce a strict Content Security Policy that disallows inline scripts to reduce the impact of stored HTML injection
- Require code review and approval for .gitlab-ci.yml changes to limit attacker control over job metadata
# Upgrade GitLab Omnibus on Debian/Ubuntu
sudo apt-get update
sudo apt-get install gitlab-ee=19.2.2-ee.0
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
# Verify 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.

