HTMLi in new gitlab application Oauth page (/oauth/authorize) leading to ATO
HackerOne report #2567533 by joaxcar
on 2024-06-20, assigned to @cmaxim:
Report | Attachments | How To Reproduce
Report
Summary
There is an HTML injection and XSS in the new https://gitlab.com/oauth/authorize page.
Sorry for the sparse report. Found this when I was supposed to go to bed. The XSS outlined here will only trigger without CSP but I hope to be able to bypass it when I wake up
Steps to reproduce
- Go to https://gitlab.com/oauth/applications
- Create a new application with the name
<img src=x onerror=alert(1)>
add the other fields. Redirect URL ashttps://example.com
and scope asapi
- Click create, take note of the application ID
- Now visit (replace APP ID)
https://gitlab.com/oauth/authorize?client_id=APP_ID&redirect_uri=https://example.com&response_type=code&scope=api
Open devtools and see the XSS blocked by CSP on gitlab.com, firing on self hosted
Impact
Stored XSS
What is the current bug behavior?
Application name rendered without sanitization
What is the expected correct behavior?
Name should be sanitized.
Output of checks
This bug happens on GitLab.com
Impact
Stored XSS
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
How To Reproduce
Please add reproducibility information to this section: