$16,000 Bounty: Stored XSS in GitLab
安全研究员发现GitLab Markdown渲染引擎中的Stored XSS漏洞,利用DesignReferenceFilter正则表达式缺陷,在评论等处注入JavaScript代码并绕过CSP。该高危漏洞获GitLab $16,000赏金。 2025-5-11 02:40:27 Author: infosecwriteups.com(查看原文) 阅读量:9 收藏

From Regex to XSS: Inside a $16,000 Vulnerability in GitLab

Monika sharma

Introduction

Security vulnerabilities often hide in the smallest implementation details. One such critical flaw was uncovered by security researcher vakzz who discovered a Stored Cross-Site Scripting (XSS) vulnerability in GitLab’s markdown rendering engine via the DesignReferenceFilter.

This vulnerability not only bypassed GitLab’s Content Security Policy (CSP) but also allowed attackers to inject arbitrary JavaScript anywhere markdown was processed such as issues comments and more.

For responsibly disclosing this high impact bug GitLab awarded a $16,000 bounty under report ID #1212067.

Let’s dive into how this vulnerability worked its potential impact and how other bug hunters can approach finding similar issues.

The Vulnerability: Breaking Out of Attributes via Filename Injection

GitLab allows users to upload design files (like images) that can be referenced in issues via markdown links. When rendering markdown GitLab uses a filter called DesignReferenceFilter to parse these references.

Under the hood a regex pattern was used to match filenames:

valid_char = %r{[^/\s]} #…

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