Summary: I was able to create a user with the username "dashboard.html". Once, the account is set up, when the user clicks on his profile, the actual dashboard will show up instead of his profile page. Same can be done for all the HTML pages in GitLab.
Steps To Reproduce:
Register a new user with "some_html_page_in_gitlab.html"
After logging in. click on the profile tab, it will be redirected to the dashboard page.
I even tried the username "profile.html", it is getting directed to the profile tab.
Impact
The major impact here I can think of is that a user can hide his profile from the public just by having a clowny username.
This issue is reproducible. To add a more broad impact, ".html" are sensitive web page extensions. They need to be stripped during the signup flow. This is in scope.
Also, setting username as any_organization.html, for example, "gitlab-org.html" redirects to the organization page upon clicking the profile tab. This means that it will be possible to add 1000s of invalid profiles with organization's names.html
Hi @exc3lsior,
I want to reopen this report and rename the title of the vulnerability and increase the Severity too. I found a way to take over a profile page of a victim. Using this technique, I can take over any profile that ends with a ".html"
Steps To Reproduce:
Victim creates his GitLab profile with the user the username "victim.html".
Now, since the profile page of the victim is public, an attacker now sees this page https://gitlab.com/victim.html and notices that .html extension is not removed from it when the page loads.
Any updates on this??? I want to update the Severity to Medium as well as per GitLab's policy that says " the finding impacts few customers in our customer base."
@jramsay@jeremy My initial guess would be ~Create since that was how gitlab-ce#54278 was assigned, but maybe it's falls under ~Manage since the impact is more broad?
Also works with projects. Update from the reporter:
I found an another vulnerability that is quite similar to this one. Using this vulnerability, I can takeover any project that ends with a ".html".
To reproduce:
Go to a group.
Create a project named "victim-project.html" so that the slug is the same.
A new project will now be created and slug will be /victim-project.html
Now go to the same group, create a subgroup with the name "victim-project" and ensure that the matches the same.
Once the group is created, navigate to the project url.
It will be redirected to the subgroup.
Using this technique any project that ends with ".html" can be taken over by the attacker. Kindly make sure that the fix handles this as well.