A security flaw in the popular WordPress plugin Google Analytics by Yoast allows hackers to execute arbitrary code and take over administrator accounts.
This could allow for arbitrary server-side code execution through the plugin or WordPress theme editors. In addition, Pynnonen says an attacker could change admin passwords, create their own accounts or take over a website through the security flaw.
Downloaded almost seven million times, Google Analytics by Yoast is a popular plugin which integrates Google’s Analytics services into a WordPress site, and also adds additional functions including error page tracking, outbound click rates and downloads. Yoast is available in free and premium versions.
The security flaw stems from two issues. First of all, there is missing access control procedures which may allow an unauthenticated user to tweak plugin settings — and it is possible to override existing OAuth2 credentials used by the plugin to pull data from Google Analytics by connecting the plugin with an attacker’s separate Google Analytics account.
Secondly, the plugin renders an HTML menu based on this data, which is not sanitized or sandboxed. If an attacker chooses to add script tags in the properties in their Google Analytics account settings, it will appear in the compromised WordPress admin dashboard — and be executed once a user views the settings page.
A proof-of-concept example is shown below.
The reauth link would have to be clicked on by the attacker, which resets plugin settings and allows the hacker to grab an authentication code from the Google OAuth system. The attacker then needs to copy and paste the code — and without authentication — the plugin would then account swap and pull its data from the attacker’s account. The payload is then entered in the hacker’s Google Analytics account.
Yoast was notified on March 18, and the company responded by rapidly deploying a new version of the plugin, 5.3.3, the next day. If you use the plugin and have not visited your website to grab this update, it is recommended you do so now.
Read on: In the world of security
- Yahoo launches password-free logins
- Feds hot on the trail of JPMorgan hackers
- EquationDrug: Sophisticated, stealthy data theft for over a decade
- Symantec research highlights security failures in the connected home
- New CryptoLocker ransomware targets gamers
Read on: Fixes and Flaws
- Adobe issues patches for 11 critical vulnerabilities in Flash Player
- Google Apps flaw exposes WHOIS data for 280,000 domains
- Samsung security: How long is ‘too long’ to patch?
- Dropbox patches Android security flaw
Article source: http://www.zdnet.com/article/security-flaw-in-wordpress-plugin-google-analytics-by-yoast-exposed/