CVE-2025-9222 Overview
CVE-2025-9222 is a stored cross-site scripting (XSS) vulnerability in GitLab Community Edition (CE) and Enterprise Edition (EE). The flaw resides in the rendering of GitLab Flavored Markdown (GLFM) and permits an authenticated user to inject persistent script content that executes in another user's browser. GitLab has remediated the issue in versions 18.5.5, 18.6.3, and 18.7.1. The weakness is tracked as CWE-79: Improper Neutralization of Input During Web Page Generation.
Critical Impact
An authenticated attacker can store malicious script payloads inside markdown fields. Victims who load the rendered content trigger script execution in their session context, enabling account takeover paths, data theft, and unauthorized actions against GitLab projects.
Affected Products
- GitLab CE/EE versions 18.2.2 through 18.5.4
- GitLab CE/EE version 18.6.0 through 18.6.2
- GitLab CE/EE version 18.7.0
Discovery Timeline
- 2026-01-07 - GitLab releases patch versions 18.7.1, 18.6.3, and 18.5.5
- 2026-01-09 - CVE-2025-9222 published to the National Vulnerability Database
- 2026-07-15 - Last updated in NVD database
Technical Details for CVE-2025-9222
Vulnerability Analysis
GitLab Flavored Markdown extends CommonMark with GitLab-specific syntax that renders across issues, merge requests, comments, wiki pages, and snippets. CVE-2025-9222 stems from insufficient neutralization of user-supplied markdown content before it reaches the DOM. An authenticated user can craft input that survives the sanitization pipeline and executes JavaScript when another user views the rendered element.
Because GitLab's markdown surface is shared across many collaboration objects, a single stored payload can reach maintainers, reviewers, and administrators. The CVSS vector indicates a scope change, meaning the injected script executes in a security context different from the vulnerable component and can affect other users of the platform.
Root Cause
The root cause is improper output encoding within the GitLab Flavored Markdown renderer [CWE-79]. Specific markdown constructs bypassed the HTML sanitizer, allowing attacker-controlled attributes or script-bearing elements to persist in stored content and render as active markup on retrieval.
Attack Vector
Exploitation requires an authenticated GitLab account with permission to submit markdown content, such as an issue comment, merge request description, or wiki page. The attacker submits a crafted payload that is stored in the GitLab database. When another authenticated user navigates to the affected page, the browser parses the malicious markup and executes the embedded script under the victim's GitLab origin. User interaction is required, aligning with the UI:R metric in the CVSS vector.
No public proof-of-concept has been released. Technical details are tracked in GitLab Issue #562561 and HackerOne Report #3297483.
Detection Methods for CVE-2025-9222
Indicators of Compromise
- Markdown content containing HTML tags such as <script>, <iframe>, <svg>, or event handlers like onerror= and onload= embedded in issues, merge requests, snippets, or wiki pages.
- Outbound HTTP requests from user browsers to unfamiliar domains immediately after loading a GitLab project page.
- Unexpected personal access token creation, SSH key additions, or session activity following a user's visit to a shared GitLab resource.
Detection Strategies
- Query the GitLab database or API for markdown fields containing suspicious HTML tags and JavaScript URI schemes across issues, notes, and wiki pages.
- Correlate GitLab audit events with browser telemetry to identify anomalous requests generated after markdown rendering.
- Review recent contributions from low-reputation or newly created accounts that inserted markdown into widely viewed projects.
Monitoring Recommendations
- Enable GitLab audit logging for issue, note, and wiki updates and forward events to a centralized log platform.
- Monitor Content Security Policy (CSP) violation reports from GitLab web sessions for blocked inline scripts.
- Alert on privileged account activity that occurs shortly after a maintainer or administrator views user-submitted content.
How to Mitigate CVE-2025-9222
Immediate Actions Required
- Upgrade GitLab CE/EE to version 18.7.1, 18.6.3, or 18.5.5 depending on the deployed release track.
- Rotate personal access tokens, session cookies, and SSH keys for users who may have viewed untrusted markdown content prior to patching.
- Audit recently created or modified issues, comments, and wiki pages for embedded HTML or script content.
Patch Information
GitLab addressed the vulnerability in the January 7, 2026 patch release. Details are available in the GitLab Patch Release Announcement and the Red Hat CVE Advisory. Self-managed operators should apply the fix promptly; GitLab.com SaaS tenants are already running the patched release.
Workarounds
- Restrict project membership and comment permissions to trusted users until upgrades complete.
- Enforce a strict Content Security Policy on the GitLab web tier to reduce the impact of injected script content.
- Educate maintainers to avoid opening unfamiliar issues or merge requests submitted by untrusted contributors while the environment remains unpatched.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

