Skip to main content

Are your github's data safe?

Sure they are, if you do not user Firefox (even the last  version) or if you do not use iOs 6.1 or some older version of IE they are really safe :)
In the last few days I got the pleasure to be in touch with the github security guys.
I must admit I am really impressed about how security is important for Github and how much serious they take it (they embrace and leverage all the new security features supported by modern browsers, Content Security Policy included ).
Moreover they are really fast on reply and really friendly so kudos to them.
From the other hand I was a bit surprised on how the "handled" a couple of issues I did report.
Now the fact I did not get a bounty doesn't play any role on my opinion (apparently both issues I reported were well known by them).
The thing that does surprise me instead is the fact that even that those are well known issues are not yet fixed (if ever).
But no more words just fact...

The first issue I reported is the following.

The .patch selector in is vulnerable to XSS indeed if a patch contains javascript this is not correctly sanitized. Live example in here.

Now I do appreciate that

a) nosniff is present
b) the content type is text/plain

but older browsers do ignore those and execute the javascript. One example is Safari for iPhone (that is actually not too old) and obviously older version of IE.
Now we are really talking about stealing cookies on a really sensitive domain right ? (always IMHO) :)
But apparently this is not enough and that output will continue to be not sanatized.

So this brings us to issue #2

Step to reproduce
- Create a new public repo e.g. (
- add a configuration config.txt file and put username and password
- commit and push
- verify anybody can see
- verify anybody can see
- change the permission of to private
- verify nobody apart asanso can see
-  verify nobody apart asanso can see

Create html and make the victim asanso visit the page

<script src="">

This extrafiliates the credentials to an attacker... 

Now, true, this will work only in Firefox since doesn't have any support for nosniff .
But isn't Firefox still one of the most used browser or am I missing something :) ?
Moreover Firefox will probably fix this issue sooner or later but what until then ?
Said that,  I just (without any irony) want to reiterate : "Great stuff Github security" (they are seriously good!!)



Popular posts from this blog

Slack SAML authentication bypass

tl;dr  I found a severe issue in the Slack's SAML implementation that allowed me to bypass the authentication. This has now been solved by Slack.
Introduction IMHO the rule #1 of any bug hunter (note I do not consider myself one of them since I do this really sporadically) is to have a good RSS feed list.  In the course of the last years I built a pretty decent one and I try to follow other security experts trying to "steal" some useful tricks. There are many experts in different fields of the security panorama and too many to quote them here (maybe another post). But one of the leading expert (that I follow) on SAML is by far Ioannis Kakavas. Indeed he was able in the last years to find serious vulnerability in the SAML implementation of Microsoft and Github. Usually I am more an "OAuth guy" but since both, SAML and OAuth, are nothing else that grandchildren of Kerberos learning SAML has been in my todo list for long time. The Github incident gave me the final…

CSRF in Facebook/Dropbox - "Mallory added a file using Dropbox"

tl;dr  Facebook Groups offers the option to upload files directly from the Dropbox account. This integration is done using the OAuth 2.0 protocol and suffered from a variant of the classic OAuth CSRF (defined by Egor Homakov as the the Most Common OAuth2 Vulnerability),  see video below:

Introduction  Facebook Groups offers the option to upload files directly from the Dropbox account:

This will allow to surf via browser the Dropbox account 

and post a specific file to the group.  This integration is done using a variant of the OAuth 2.0 protocol seen in this blog many many times. But once more, OAuth is an access delegation protocol standardized under the IETF umbrella. A typical OAuth flow would look like:
Usually the client initiates the OAuth flow in the following way:

then after that the resource owner has authorized the client the authorization server redirects the resource owner back to the client with an authorization code:
Then the OAuth dance continues....
Facebook/Dropbox i…

Meh : CSRF in Facebook Delegated Account Recovery

Note this is going to be a quick post.

This year, at Enigma 2017 Conference, Facebook introduced a way to move Account Recovery beyond Email and the "Secret" Question.
After the presentation the moved operationally and presented the first integration partner : Github.

These days I have seen a lot of press around this and both Facebook and Github open sourced their implementation and specification (also presented at F8).
Well it turned out that Facebook side was susceptible to Cross Site Request Forgery.
Really simple explanation:

The attacker start the integration with Github and stop the flow at the right moment. The create an attacker page as
<img src="…