August 8, 2014 · Bug Bounty Facebook OAuth MailChimp

Facebook MailChimp Application OAuth 2.0 Misconfiguration

I am sharing one of my findings that I submitted to Facebook's Whitehat program earlier this year.

Facebook Ads Manager provides a sort of integration with MailChimp, to fetch data to Facebook Ads Manager.The application is a part of MailChimp website, it works on MailChimp OAuth 2.0 implementation and is purely developed by Facebook Developers. So once the MailChimp user authorises the application, it will send MailChimp data to Facebook Ads Manager.

OAuth Authorisation URL for Facebook Custom Audiences is/was:

I tried to play around with redirect_uri to hijack the control flow, via different techniques but failed.I moved and started fiddling around the MailChimp OAuth 2.0 specs, I discovered something interesting, the specs talks about wildcard redirect_uri.

So, I gave a second thought what-if Facebook had their redirect_uri misconfigured to * instead of I tried a few requests such as the following and all worked: derp%2F lahblah%2F

So, basically I can tamper the redirect_uri and hijack the OAuth flow to [controlled] on, it's evident that Facebook hosts 3rd party applications under, using this a redirect url can be constructed which will point to a malicious 3rd party that will steal the MailChimp access_token using this Facebook Custom Audiences Application.

Final Attacking Steps would be:

1.Attacker sends Facebook Custom Audiences OAuth link with tampered redirect_uri to the victim: attacker%2F

2.Victim Authorises the MailChimp application

3.Attacker receives access_token using his malicious app hosted at

Facebook has fixed the vulnerability by restricting redirect_uri to and rewarded this bug.