Skip to content
Info disclosure Disclosed report

Information Disclosure Vulnerability Permits Attacker Obtains The GitHub OAUTH Return Code

Mario Gomes Follow

Originally disclosed on Mozilla

  • Fixed in 30 hours
  • Paid in 7 days
  • Disclosed after 30 hours
Text
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36

Steps to reproduce:

Hi,

I have found a security bug that allows me obtain the valid github oauth code return, then allowing me log into the victim's account.

To make it you have to be logged in github, and unlogged in Bugzilla.

Reproduce:
1. Log in Github
2. Once you already have logged in bugzilla using GitHub, visit https://github.com/login/oauth/authorize?client_id=53a879b058c4e4953f95&scope=user%3Aemail&state=INVALID_STATE&redirect_uri=https://bugzilla.mozilla.org/attachment.cgi?id=8648983
3. You'll be automatically redirected to the attachment https://bugzilla.mozilla.org/attachment.cgi?id=8648983, which in URL will contain the VALID GITHUB OAUTH CODE.
4. using this code, go to another browser and visit https://bugzilla.mozilla.org/
5. On the "other browser" there'll be a valid state code in its source code, copy it.
6. now go back in the attachment https://bugzilla.mozilla.org/attachment.cgi?id=8648983, there should be the an URL just like this: https://bug1195525.bmoattachments.org/attachment.cgi?id=8648983&code=[code-return]&state=INVALID_STATE
7. replace the "INVALID_STATE" with the one you got from the "other browser"
8. now add "github_login=1" to the end of the url.
9. now you'll set, just open this URL in the "other browser"(attacker's browser).
10. see you're logged in victim's account.

To exploit it all what I've gotta do it:
1. Make sure victim is logged in GitHub and uses it to log into the bugzilla frequently.
2. Make sure isn't logged in bugzilla(it's easy to unlogd, just use a <img src='https://bugzilla.mozilla.org/index.cgi?logout=1'>)
3. convince the victim to open the specially crafted page that will redirect her to the github oauth url and back to the attachment which i'll have access to his oauth code).

I think this is critical 'cause it isn't hard to make it work in real world scenario and it requires only the victim to vist a page).

The original report as published on Mozilla's Bugzilla, by Mario Gomes. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A high-severity info disclosure bug in Extensions. Mozilla made it public on 19 August 2015.

About Info disclosure

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Mario Gomes

View all

17 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.