CVE-2021-22220
GitLab vulnerability analysis and mitigation

Overview

A stored Cross-Site Scripting (XSS) vulnerability was discovered in GitLab affecting all versions starting with 13.10. The vulnerability was specifically found in the blob viewer component when displaying notebooks (GitLab Security, CVE Mitre).

Technical details

The vulnerability arose from GitLab's use of DOMPurify for data sanitization, which by default allows data-* attributes. When combined with rails-ujs, these attributes could be exploited to execute arbitrary JavaScript code. The vulnerability was assigned a medium severity rating with a CVSS score of 6.1 (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N) (GitLab Security).

Impact

When exploited, the vulnerability allowed attackers to execute arbitrary JavaScript code when victims clicked anywhere on the notebook viewer screen. Since GitLab allows sending API requests via JavaScript in web browsers, attackers could potentially perform unauthorized actions on behalf of victims, including escalating permissions and accessing private objects (GitLab Issue).

Mitigation and workarounds

The vulnerability was patched in GitLab versions 13.12.2, 13.11.5, and 13.10.5. GitLab strongly recommended that all installations running affected versions be upgraded to the latest version immediately (GitLab Security).

Additional resources


SourceThis report was generated using AI

Related GitLab vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2024-9183HIGH7.7
  • GitLabGitLab
  • cpe:2.3:a:gitlab:gitlab
NoYesDec 05, 2025
CVE-2025-7449MEDIUM6.5
  • GitLabGitLab
  • cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*
NoYesNov 26, 2025
CVE-2025-12653MEDIUM6.5
  • GitLabGitLab
  • gitlab
NoYesNov 26, 2025
CVE-2025-13611MEDIUM5.3
  • GitLabGitLab
  • cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*
NoYesNov 26, 2025
CVE-2025-6195MEDIUM4.3
  • GitLabGitLab
  • gitlab
NoYesNov 26, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management