Wordpress.com REST API oauth bypass via Cross Site Flashing
The crossdomain.xml file on public-api.wordpress.com allowed Flash requests from Yahoo domains, which are vulnerable to cross-site flashing. An attacker could inject Flash code on a Yahoo domain to read responses from the WordPress API and bypass OAuth authorisation, gaining access to a victim's account without interaction.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 3 days
- Paid in 3 days
- Disclosed after 18 months
Hello Automattic Security Team,
There is a vulnerability in https://public-api.wordpress.com/crossdomain.xml. This file allows *.yahoo.com and *.yimg.com to perform cross domain requests to https://public-api.wordpress.com. However, these domains are vulnerable to Cross-Site flashing.
An attacker can inject his own Flash code in yimg.com and send requests to any https://public-api.wordpress.com URL and read response source code. This allows an attacker to bypass the Wordpress.com REST API oauth authorization flow and get authorization to access the victim Worpress.com account without user interaction.
POC link :
http://opnsec.com/wp/hunger.html
Prerequisites :
- Tested on Windows 7/8/10 with Chrome 49, Firefox 49 and IE 11/Edge
- Flash must be active
- You must be logged in wordpress.com
- Note : The POC loads a quite noisy swf file so you should mute the system sound volume before opening it !
Instructions :
- Load the POC link
- Wait 10-20 sec
- If you are logged in wordpress.com, the app "OauthBypasss" will have full authorization to access your Wordpress.com account.
Mitigation :
To solve this vulnerability, you should remove https://public-api.wordpress.com/crossdomain.xml file.
If you need to keep this file, you should do a redirection of http://public-api.wordpress.com/oauth2/ to another subdomain that doesn't have a crossdomain.xml file. Like this the yahoo flash applications can still access your API but not the oauth authorization flow.
Regards, Enguerran @opnsec
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 crossdomain.xml file trusted domains that host user-uploaded Flash content, allowing an attacker to run Flash from a trusted origin and read cross-origin responses.
What the attacker needed
Flash must be active; Victim logged in to wordpress.com; Victim loads the POC link
The fix
The crossdomain.xml file should be removed, or OAuth endpoints should be redirected to a subdomain without a crossdomain.xml file.
How it was found
- Load the proof-of-concept link.
- Wait 10-20 seconds.
- If logged in to wordpress.com, the app 'OauthBypasss' will have full authorization to access the account.
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.
A file called crossdomain.xml tells Flash which other sites may make requests to a site. WordPress allowed Yahoo sites, but those Yahoo sites are vulnerable to cross-site flashing. So an attacker could use a Yahoo page to quietly get authorisation to access your account, because WordPress trusted Yahoo.
What is OAuth / SSO?
Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.