LiveActive security incident?Get immediate response
CVE Record

CVE-2021-22242: Insufficient input sanitization in Mermaid markdown in GitLab CE/EE version 11.4 and up allows an attacker...

Insufficient input sanitization in Mermaid markdown in GitLab CE/EE version 11.4 and up allows an attacker to exploit a stored cross-site scripting vulnerability via a specially-crafted markdown

HighCVSS 8.7Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

CVE-2021-22242 is a stored cross-site scripting issue in GitLab CE/EE Mermaid markdown handling. A logged-in attacker could save malicious markdown that runs when another user views it, potentially exposing sensitive data or allowing actions as that user.

Executive priority

Treat this as a high-priority remediation for vulnerable GitLab instances, especially where external collaborators or many internal users can create markdown viewed by maintainers or administrators.

Technical view

GitLab CE/EE version 11.4 and later had insufficient input sanitization for Mermaid markdown. The affected ranges are >=11.4 <13.12.9, >=14.0 <14.0.7, and >=14.1 <14.1.2. CVSS 3.1 is 8.7 with low complexity, low privileges, required user interaction, changed scope, and high confidentiality and integrity impact.

Likely exposure

Exposure is most likely on self-managed GitLab CE/EE instances running the listed vulnerable versions where untrusted or low-privileged users can submit markdown that others view.

Exploitation context

The provided sources do not show CISA KEV listing or active exploitation. Exploitation requires a low-privileged attacker to create crafted markdown and another user to view the stored content.

Researcher notes

The issue is stored XSS, not remote code execution. The CVSS vector supports high confidentiality and integrity impact but no availability impact. Evidence in the bundle does not establish exploitation in the wild.

Mitigation direction

  • Upgrade GitLab CE/EE beyond the affected version ranges.
  • Prioritize instances allowing broad project, issue, wiki, or merge request contributions.
  • Review GitLab vendor guidance for any additional workarounds or backport details.
  • Restrict untrusted markdown contribution paths until upgraded if business workflows allow.

Validation and detection

  • Inventory all GitLab CE/EE instances and record exact versions.
  • Compare versions against the affected ranges in the CVE record.
  • Identify places where Mermaid markdown is enabled and rendered.
  • Review logs and content history for suspicious Mermaid markdown submissions.
Prepared
Confidence
high
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2021-22242 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.7 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
4Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.7CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N2.35.8Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

8.7High
CVSS 3.1 vector shape for CVE-2021-22242Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
GitLabGitLab>=11.4, <13.12.9, >=14.0, <14.0.7, >=14.1, <14.1.2Listed
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.