External emails not obscured under certain conditions on issue system notes
The email obfuscation feature for quick actions on issue notes fails when the email's local part ends with certain special characters, leaving the email publicly visible to unauthenticated users. An attacker could add such an email via a quick action and expose it to anyone viewing the issue.
GitLab
Originally disclosed on GitLab
- Fixed in 4 months
- Disclosed after 4 months
⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.
HackerOne report #2589338 by ashish_r_padelkar on 2024-07-08, assigned to @ottilia_westerlund:
Report | How To Reproduce
Report
Summary
Hello,
I reported similar issue earlier #2456229 and it was closed as informative as internal team was aware of it and already working on the fix. I see the fix has been merged here as per this comment https://gitlab.com/gitlab-org/gitlab/-/issues/455813#note_1859326448 .
The fix obfuscate the email addresses also added via quick action on the issue /add_email <email ID> for unauthenticated users and works as intended. However, if the email address that ends their local part with any of the allowed special characters, the email is still publicly visible.
For eg as per https://en.wikipedia.org/wiki/Email_address#Local-part, the local part of an email can contain !#$%&'*+-/=?^_{|}~` special characters. So if we anyone add emails that ends the local part with these characters, email is directly visible.
For eg /add_email email#[@]example. This will create system note on issue and is visible on issue timeline for any unauthenticated users.
Steps to reproduce
1.Create an issue in your public project.
2.Add an email using quick action inside issue comment /add_email email[@]example .
3.Now visit the issue link without authentication and you should see email[@]example is obscured.
4.Now add /add_email email#[@]example .
5.Now visit again , this time you should see email is publicly visible without authentication on issue timeline system note.
So any email that ends their local part with allowed special characters !#$%&'*+-/=?^_{|}~` will be publicly visible.
What is the current bug behavior?
External emails are publicly visible under certain conditions on issue system notes
What is the expected correct behavior?
Email should be properly obscured when email local part ends with allowed special characters.
Output of checks
This bug happens on GitLab.com
Regards,
Ashish
Impact
External emails not obscured under certain conditions on issue system notes
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
Impact
External email addresses added via quick actions may be exposed to unauthenticated users when the local part ends with certain special characters.
What the attacker needed
Public project; ability to comment on issues
The fix
The email obfuscation should be updated to properly obscure emails whose local part ends with allowed special characters.
How it was found
- Create an issue in a public project.
- Add an email using the quick action /add_email with a normal email address.
- Visit the issue without authentication and confirm the email is obscured.
- Add another email using /add_email where the local part ends with a special character.
- Visit the issue again without authentication and observe the email is publicly visible.
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.
GitLab tries to hide email addresses added to issues so that outsiders cannot see them. However, if the email address has a special character like # or ! just before the @ symbol, the hiding does not work and the email is shown to everyone. This means private information could leak.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.