Commite Access to Project due to bypass of recommended email regex!
HackerOne report #631879 by ngalog
on 2019-06-29, assigned to gitlab_cmaxim
:
Summary
The recommended regex of commiter author's email is like this Example: @my-company.com$
It forgot to escape the dot. In normal situation this is fine, however if the user used subdomain of the email address, then this could be bypassed as below.
Commiter Authori's email regex: @sub.company.com$
user1@sub.company.com -> pass
user1@subacompany.com -> also pass the regex
Steps to reproduce:
Visit https://gitlab.com/:project/-/settings/repository and you should see the recommended regex of email could be bypassed.
Impact
This allow user to use other email address to bypass the commitor's email address. Unauthoirzed change to project source code.
What is the current bug behavior?
recommended regex is @sub.company.com$
What is the expected correct behavior?
should be @sub\.company\.com$
Relevant logs and/or screenshots
Output of checks
GitLab.com and EE and CE of 12.0
Impact
.
Attachments
Warning: Attachments received through HackerOne, please exercise caution!