Reflected XSS vulnerability on https://test1.default.temp1.secauto-dev.sec.gitlab.net
A reflected XSS vulnerability was found on a GitLab test domain, where a base64-encoded payload in the URL path was decoded and executed as JavaScript. An attacker could craft a link that, when clicked, runs arbitrary script in the victim's browser, potentially stealing session tokens or performing actions on their behalf.
GitLab
Originally disclosed on GitLab
- Fixed in 4 hours
- Disclosed after 4 hours
HackerOne report #1646034 by smsecurity on 2022-07-22, assigned to GitLab Team:
Report | Attachments | How To Reproduce
Report
Hi team,
Summary:
I have found a Reflected XSS vulnerability on https://test1.default.temp1.secauto-dev.sec.gitlab.net/
Description:
The Reflected XSS is on the following page:
https://test1.default.temp1.secauto-dev.sec.gitlab.net/base64/PHNjcmlwdD5hbGVydChkb2N1bWVudC5kb21haW4pPC9zY3JpcHQ+
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Step-by-step Reproduction Instructions
- Open any browser.
- Enter the following address: https://test1.default.temp1.secauto-dev.sec.gitlab.net/base64/PHNjcmlwdD5hbGVydChkb2N1bWVudC5kb21haW4pPC9zY3JpcHQ+
- Confirm the alert popup with the domain in it.

Remediation
In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using this solution:
- User input should be HTML-encoded at any point where it is copied into application responses. All HTML metacharacters, including < > " ' and =, should be replaced with the corresponding HTML entities.
Impact
The attacker-supplied code can perform a wide variety of actions, such as stealing the victim's session token or login credentials, performing arbitrary actions on the victim's behalf, and logging their keystrokes. An attacker can also use XSS to redirect victim's to malicious web sites that can lead to other type of attack (launch a phishing scam, steal user credentials, etc..). The user will believe the link is trust-worthy because of the domain name gitlab.net.
Best regards,
[@]smsecurity
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
How To Reproduce
Please add reproducibility information to this section:
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application decoded a base64-encoded path segment and inserted the result into the HTML response without encoding it.
Impact
The attacker-supplied code could steal the victim's session token or login credentials, perform arbitrary actions on the victim's behalf, log keystrokes, or redirect to malicious sites; the user may trust the link because of the gitlab.net domain.
What the attacker needed
Victim clicks a crafted link
The fix
User input should be HTML-encoded at any point where it is copied into application responses, replacing metacharacters with HTML entities.
How it was found
- Open any browser.
- Enter the provided URL with the base64-encoded payload in the path.
- Confirm the alert popup showing the domain.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Cross-site scripting (XSS) is when a website takes input from a user and puts it into a page without cleaning it, so an attacker can make the site run their own code. Here, the site took a base64-encoded string from the URL, decoded it, and inserted it into the page, so the attacker's script ran. This could let an attacker steal a user's login session or act as them.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.