Skip to main content

Bounty leftover Part #2 (target Google)

In my previous blog post I mentioned a following post about some vulnerability I found in
As said, motivated from my little success that I got finding a vulnerability in some obsolete authorization service in Facebook I thought I might have the same luck with Google :)
Well it turned out this was the case...
Giving a look at the Older Protocols in the Google Accounts Authentication and Authorization page something that immediately caught my attention was the AuthSub (deprecated) flow.
Now, I am not going to describe here the flow, it is enough saying that it is a pre-OAuth flow that Google used to give some access delegation using some sort of tokens...
The problem was related with the scope parameter in It accepted concatenation of string after a valid scope. 

So far so good.
The next natural step would have been to use the to get the scope back with the given stored javascript.
At a first sigh this looked like unexploitable since as per doc this would require a request header, namely 

curl -H "Authorization:AuthSub token="1/XD7eCi3_
2mXSfDHXLtImg0Oc1nDoZCFKL4dLrqzVYVk"" -H "application/x-www-form-urlencoded"

The reality though was that it existed also another version of the service that accepts request parameter (and the cherry on top was that this service also runs in that is the most rewarded according to


curl -v

> User-Agent: curl/7.30.0

> Host:

> Accept: */*


< HTTP/1.1 200 OK

< Content-Type: text/plain; charset=UTF-8

< X-Frame-Options: DENY

< Date: Thu, 07 Aug 2014 20:10:51 GMT

< Expires: Thu, 07 Aug 2014 20:10:51 GMT

< Cache-Control: private, max-age=0

< X-Content-Type-Options: nosniff

< X-XSS-Protection: 1; mode=block

< Content-Length: 106

< * Server GSE is not blacklisted

< Server: GSE

< Alternate-Protocol: 443:quic





Some observations:

  • the scope is not sanitized (so he can lead to a XSS ) but
  • no sniff is present
  • Content Type is text/plain
To conclude this is the attack scenario

Once reported Google fixed it pretty soon and also got a reward for it... Not bad for a left over :p

Thanks Google security.


Popular posts from this blog

OpenSSL Key Recovery Attack on DH small subgroups (CVE-2016-0701)

Usual Mandatory Disclaimer: IANAC (I am not a cryptographer) so I might likely end up writing a bunch of mistakes in this blog post... tl;dr The OpenSSL 1.0.2 releases suffer from a Key Recovery Attack on DH small subgroups . This issue got assigned CVE-2016-0701 with a severity of High and OpenSSL 1.0.2 users should upgrade to 1.0.2f. If an application is using DH configured with parameters based on primes that are not "safe" or not Lim-Lee (as the one in RFC 5114 ) and either Static DH ciphersuites are used or DHE ciphersuites with the default OpenSSL configuration (in particular SSL_OP_SINGLE_DH_USE is not set) then is vulnerable to this attack.  It is believed that many popular applications (e.g. Apache mod_ssl) do set the  SSL_OP_SINGLE_DH_USE option and would therefore not be at risk (for DHE ciphersuites), they still might be for Static DH ciphersuites. Introduction So if you are still here it means you wanna know more. And here is the thing. In my last bl

The Curious Case of WebCrypto Diffie-Hellman on Firefox - Small Subgroups Key Recovery Attack on DH

tl;dr Mozilla Firefox prior to version 72 suffers from Small Subgroups Key Recovery Attack on DH in the WebCrypto 's API. The Firefox's team fixed the issue r emoving completely support for DH over finite fields (that is not in the WebCrypto standard). If you find this interesting read further below. Premise In this blog post I assume you are already knowledgeable about Diffie-Hellman over finite fields and related attacks. If not I recommend to read any cryptography book that covers public key cryptography. Here is a really cool simple explanation by David Wong : I found a cooler way to explain Diffie-Hellman :D — David Wong (@cryptodavidw) January 4, 2020 If you want more details about Small Subgroups Key Recovery Attack on DH I covered some background in one of my previous post ( OpenSSL Key Recovery Attack on DH small subgroups (CVE-2016-0701) ). There is also an academic pape r where we examine the issue with some more rigors.

All your Paypal OAuth tokens belong to me - localhost for the win

tl;dr   I was able to hijack the OAuth tokens of EVERY Paypal OAuth application with a really simple trick. Introduction If you have been following this blog you might have got tired of how many times  I have stressed out the importance of the redirect_uri parameter in the OAuth flow. This simple parameter might be source of many headaches for any maintainer of OAuth installations being it a client or a server. Accepting the risk of repeating myself here is two simple suggestions that may help you stay away from troubles (you can always skip this part and going directly to the Paypal Vulnerability section): If you are building an OAuth client,   Thou shall register a redirect_uri as much as specific as you can i.e. if your OAuth client callback is then DO register   NOT JUST h ttps:// or If