CVE-2021-22242
MediumInsufficient 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
Published Aug 25, 2021 · Updated Sep 10, 2026 · Also known as BIT-gitlab-2021-22242, UBUNTU-CVE-2021-22242
Key Facts
Patch immediately- CVE-2021-22242 is a medium-severity vulnerability (CVSS 5.4 v3.1) affecting GitLab.
- It is not listed in any known-exploited vulnerabilities catalog. No public exploit code is known.
- EPSS estimates a 64% probability of exploitation in the next 30 days.
- Fixed versions are available, including GitLab 13.12.9, GitLab 14.0.7, GitLab 14.1.2.
- Brandefense priority: patch immediately, because it is very likely to be exploited soon.
CVSS v3.1
5.4
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
EPSS (30-day exploit likelihood)
64%
Higher than 99.2% of all scored CVEs
Exploited in the wild
No known
Not in a known-exploited catalog
Public exploit code
None known
Get the full CVE-2021-22242 brief as a PDF
Every affected product and fixed release, exploitation status and a first 24 hours response checklist, emailed within minutes.
Description
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
Affected Products
6 affected entries in total| Product | Affected versions | Fixed in |
|---|---|---|
| GitLabGitlab | >= 11.4.0, >= >=11.4, <13.12.9 | 13.12.9 |
Patched Releases
GitLab
13.12.9, 14.0.7, 14.1.2, 15.10.8+ds1-2
Timeline
Publicly disclosed
Aug 25, 2021
Last updated
Sep 10, 2026
Weakness Type
- CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References
- advisoryhttps://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-22242.json
- advisoryhttps://hackerone.com/reports/1212822
- advisoryhttps://ubuntu.com/security/CVE-2021-22242
- advisoryhttps://www.cve.org/CVERecord?id=CVE-2021-22242
- articlehttps://nvd.nist.gov/vuln/detail/CVE-2021-22242
FAQ
Common Questions.
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
Affected: GitLab versions >= 11.4.0, >= >=11.4, <13.12.9. The full list is in the CVE brief.
It is not listed in any known-exploited vulnerabilities catalog.
No, it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
No public exploit code is known.
Fixed versions are available, including GitLab 13.12.9, GitLab 14.0.7, GitLab 14.1.2.
Brandefense priority: patch immediately, because it is very likely to be exploited soon.
Is CVE-2021-22242 Running On Your Attack Surface?
Brandefense maps vulnerabilities like this one to your internet-facing assets and tells you exactly where to patch.
Request A Demo