Lack of cross-origin request blocking allows leaking of sensitive information on several endpoints
Responses for existing programs the user can access differ in size from those for non-existent or inaccessible programs, and this size difference can be detected through the time each request takes to be cached. An attacker could use this to work out which private programs a victim has access to.
- Disclosed after 26 days
Summary: It is possible to make users leak sensitive information on several endpoints by measuring the time certain requests take to be cached.
Description: If a request is made to https://hackerone.com/github/weaknesses and the user is logged in, the size of the response will be around 9kb (because the user both has access and is allowed to report bugs to this program).
If a request is made to https://hackerone.com/notexistent/weaknesses and the user is logged in, the size of the response will be around 1.5kb (because the program doesn't exist/user doesn't have access to it).
Note that an existing program an user has access to returns a different response size than one that does not exist/he has not access to, and because of this, it’s possible to infer whether certain programs exist by measuring the difference in time each request takes to be cached.
Also, note that this problem isn't exclusive to this endpoint. There are others that could be used to achieve a similar effect, for example:
- https://hackerone.com/bugs.json?subject=user&reported_to_team=github
- https://hackerone.com/bugs?subject=github
Steps to reproduce: I created a PoC that will abuse the vulnerability described above to enumerate private programs that the victim has access to. It is also able to enumerate private programs that the victim has been invited to, but has not accepted the invitation yet.
- https://lbherrera.github.io/lab/hackerone/private.html
- Type the name of a private program you have access to on the prompt dialog.
- Open the DevTools to follow the attack's execution in real time.
- Maybe you will have to tweak the avg_time variable for it to work given I used one that works on my hardware and didn't implement a function to adjust it to other computers, but it can be done.
Impact
Attacker can enumerate private programs a victim has access to if the victim accesses the attacker's page. The attacker's page could be sent to high profile reporters and HackerOne employees given they have access to a large number of private programs in order to abuse the vulnerability to its full potential.
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
Root cause
Likely the application returns responses of different sizes for accessible versus inaccessible resources and does not prevent cross-origin timing measurement of caching, letting the size difference leak through timing.
Impact
An attacker could enumerate private programs a victim has access to if the victim visits the attacker's page, and could target high-profile reporters or employees who belong to many private programs.
What the attacker needed
Victim visits attacker's page; victim logged in to the site; timing value may need tuning
How it was found
- Open the attacker's proof-of-concept page.
- Enter the name of a private program the victim has access to in the prompt dialog.
- Open the browser developer tools to watch the attack run in real time.
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.
When you visit a page, your browser stores a copy (the cache) so it loads faster next time. The report says pages for programs you can see are bigger than pages for programs you cannot, and the bigger page takes slightly longer to store. By timing that delay from a page they control, an attacker can guess which private programs you belong to.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.