$2000 Bounty: Stored XSS in GitLab
GitLab的仓库查看器因使用过时的Swagger UI和DOMPurify库存在存储型XSS漏洞。攻击者可上传恶意OpenAPI文件,在用户查看时触发XSS攻击。 2025-5-6 07:16:57 Author: infosecwriteups.com(查看原文) 阅读量:16 收藏

Exploiting a stored XSS in GitLab’s repository viewer for $2000

Monika sharma

Introduction

Cross-Site Scripting (XSS) continues to be one of the most impactful web vulnerabilities even in large and mature platforms like GitLab. In this write-up we’ll explore an interesting stored XSS vulnerability discovered by security researcher kannthu in GitLab’s repository file viewer earning a $2000 bounty for their finding under report ID #1072868.

We’ll break down how the vulnerability was found, the root cause, the proof of concept (PoC), and why it posed a real security risk.

What was the vulnerability?

GitLab uses an embedded Swagger UI to display OpenAPI specifications within repository files. Unfortunately the version of Swagger UI in use was outdated and relied on an old version of DOMPurify (a popular JavaScript sanitizer library).

This older DOMPurify version didn’t properly sanitize all malicious HTML attributes leaving the application vulnerable to XSS.

This meant an attacker could upload a malicious OpenAPI file (like openapi.yaml) containing crafted payloads. When a user viewed this file via GitLab’s interface the payload would be stored and executed leading to a stored XSS.


文章来源: https://infosecwriteups.com/2000-bounty-stored-xss-in-gitlab-c71b2d7a3c21?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh