The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-2973

CVE-2026-2973: GitLab Mermaid Diagram XSS Vulnerability

CVE-2026-2973 is a cross-site scripting flaw in GitLab CE/EE that allows authenticated users to execute arbitrary JavaScript via Mermaid diagrams. This article covers technical details, affected versions, and mitigation.

Published: March 27, 2026

CVE-2026-2973 Overview

A stored Cross-Site Scripting (XSS) vulnerability has been identified in GitLab Community Edition (CE) and Enterprise Edition (EE) that affects all versions from 17.7 before 18.8.7, 18.9 before 18.9.3, and 18.10 before 18.10.1. This vulnerability allows an authenticated user to execute arbitrary JavaScript in a victim's browser due to improper sanitization of entity-encoded content in Mermaid diagrams.

Critical Impact

Authenticated attackers can inject malicious JavaScript through crafted Mermaid diagrams, potentially leading to session hijacking, credential theft, or unauthorized actions on behalf of legitimate users.

Affected Products

  • GitLab Community Edition (CE) versions 17.7 to 18.8.6
  • GitLab Enterprise Edition (EE) versions 17.7 to 18.8.6
  • GitLab CE/EE versions 18.9.0 to 18.9.2
  • GitLab CE/EE version 18.10.0

Discovery Timeline

  • 2026-03-25 - CVE-2026-2973 published to NVD
  • 2026-03-25 - GitLab releases security patch (versions 18.10.1, 18.9.3, 18.8.7)
  • 2026-03-26 - Last updated in NVD database

Technical Details for CVE-2026-2973

Vulnerability Analysis

This vulnerability stems from improper sanitization of entity-encoded content within Mermaid diagrams in GitLab. Mermaid is a JavaScript-based diagramming tool that GitLab uses to render diagrams from text in Markdown files, issues, merge requests, and wikis. The XSS vulnerability occurs when the sanitization logic fails to properly handle HTML entity-encoded payloads, allowing attackers to bypass input filtering mechanisms.

When a user views a page containing a maliciously crafted Mermaid diagram, the entity-encoded JavaScript payload is decoded and executed in the context of the victim's browser session. This can compromise the confidentiality and integrity of user data without causing a denial of service condition.

Root Cause

The root cause is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation). GitLab's content sanitization for Mermaid diagrams did not adequately handle entity-encoded characters, allowing attackers to craft payloads that bypass the sanitization filters. When the browser renders the diagram, these entity-encoded sequences are decoded back to their original characters, resulting in executable JavaScript code.

Attack Vector

The attack requires network access and an authenticated user account on the GitLab instance. The attacker must craft a Mermaid diagram containing entity-encoded JavaScript and embed it in content visible to other users, such as:

  • Issue descriptions or comments
  • Merge request descriptions
  • Wiki pages
  • Repository Markdown files

When a victim user views the page containing the malicious diagram, the JavaScript executes in their browser context. The attack changes scope (indicated by the changed scope metric), meaning the vulnerability can affect resources beyond the vulnerable component. User interaction is required as the victim must navigate to the page containing the malicious content.

The vulnerability mechanism exploits the difference between server-side sanitization and client-side rendering. Entity-encoded characters like < (representing <) may pass through server-side filters that look for literal angle brackets, but are decoded by the browser during rendering. For detailed technical information, refer to the HackerOne Report #3566802 and GitLab Work Item #591049.

Detection Methods for CVE-2026-2973

Indicators of Compromise

  • Mermaid diagram blocks in issues, merge requests, or wikis containing unusual entity-encoded sequences
  • User reports of unexpected browser behavior or redirects when viewing specific GitLab pages
  • Audit logs showing suspicious activity from user sessions that may have been hijacked
  • Presence of HTML entity patterns like &#x or < within Mermaid code blocks

Detection Strategies

  • Implement content security policy (CSP) headers to detect and prevent inline script execution
  • Monitor web application firewall (WAF) logs for patterns indicating XSS attempts in diagram content
  • Review GitLab audit logs for suspicious user activities that may indicate compromised sessions
  • Scan repository content and issue databases for Mermaid blocks containing entity-encoded HTML characters

Monitoring Recommendations

  • Enable browser-based XSS detection alerts through CSP violation reporting
  • Configure WAF rules to flag requests containing entity-encoded JavaScript patterns
  • Implement session anomaly detection to identify potential session hijacking
  • Regularly audit user-generated content containing Mermaid diagrams for suspicious patterns

How to Mitigate CVE-2026-2973

Immediate Actions Required

  • Upgrade GitLab CE/EE to version 18.10.1, 18.9.3, or 18.8.7 immediately
  • Review recent Mermaid diagram content in issues, merge requests, and wikis for potential exploitation attempts
  • Consider temporarily disabling Mermaid diagram rendering if immediate patching is not possible
  • Implement or strengthen Content Security Policy headers to mitigate XSS impact

Patch Information

GitLab has released patched versions addressing this vulnerability. Organizations should upgrade to one of the following fixed versions based on their current deployment:

Current Version RangeUpgrade To
17.7.x - 18.8.x18.8.7
18.9.x18.9.3
18.10.018.10.1

For complete patch details and upgrade instructions, see the GitLab Patch Release Announcement.

Workarounds

  • Deploy a Web Application Firewall (WAF) with rules to block entity-encoded XSS patterns
  • Implement strict Content Security Policy headers including script-src 'self' to prevent inline script execution
  • Disable Mermaid diagram rendering through GitLab configuration if the feature is not essential
  • Restrict repository and issue creation permissions to trusted users until patching is complete
bash
# Example: Add CSP headers via GitLab's nginx configuration
# Edit /etc/gitlab/gitlab.rb and add:
nginx['custom_gitlab_server_config'] = "add_header Content-Security-Policy \"default-src 'self'; script-src 'self'; object-src 'none';\";"

# Reconfigure GitLab to apply changes
sudo gitlab-ctl reconfigure

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechGitlab

  • SeverityMEDIUM

  • CVSS Score5.4

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitLab Work Item #591049

  • HackerOne Report #3566802
  • Vendor Resources
  • GitLab Patch Release Announcement
  • Related CVEs
  • CVE-2026-1090: GitLab CE/EE XSS Vulnerability

  • CVE-2026-0752: GitLab Mermaid Sandbox XSS Vulnerability

  • CVE-2026-1282: GitLab XSS Vulnerability in Project Labels

  • CVE-2026-0595: GitLab HTML Injection XSS Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English