XSS in static site editor!
A cross-site scripting flaw existed in GitLab's static site editor, allowing an attacker to inject JavaScript via a crafted link. An attacker could execute arbitrary JavaScript in a victim's browser to perform actions on their behalf or steal data.
GitLab
Originally disclosed on GitLab
- Fixed in 28 days
- Disclosed after 28 days
HackerOne report #864356 by bull on 2020-05-01, assigned to @rchan-gitlab:
Hi,
I have found an issue which can be used by an attacker to insert malicious javascript for user and take actions on behalf of the user, steal data etc.
POC:
-
go to your gitlab instance,
-
create a public project with
.mdfile in it -
invite victim as
developerto your project -
serve malicious link :
https://gitlab.example.com/USERNAME/REPOSITORY/-/sse/master/FILENAME.md?return_url=javascript:alert(document.domain)
video:
[REDACTED]
Isn't triggering on gitlab.com due to CSP, injection is there,
let me know if you need any more information or if i missed something
thanks
bull
Impact
XSS in gitlab instance!
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
[REDACTED]
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
Impact
An attacker could execute JavaScript in a victim's browser to take actions on their behalf or steal data, though the exploit did not trigger on gitlab.com due to CSP.
What the attacker needed
A GitLab instance; ability to create a public project; victim invited as developer; victim clicks a crafted link
How it was found
- Go to your GitLab instance.
- Create a public project with a .md file in it.
- Invite the victim as a developer to your project.
- Serve the malicious link containing the javascript: return_url to the victim.
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 a type of security bug where an attacker can sneak harmful JavaScript code into a trusted website. When a victim visits a specially crafted link, that code runs in their browser as if it came from the site, letting the attacker act as the victim or steal information.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.