A cross-site scripting vulnerability is threatening WordPress content management system platforms worldwide. The popular CMS is used by nearly 186,700 of the top one million websites.
The attack relies on the fact that comments are usually reviewed by WordPress users with admin level privileges.
“If the comment text is long enough, it will be truncated when inserted in the database. The MySQL TEXT type size limit is 64 kilobytes, so the comment has to be quite long.
The truncation results in malformed HTML generated on the page. The attacker can supply any attributes in the allowed HTML tags, in the same way as with the two recently published stored XSS vulnerabilities affecting the WordPress core.” continues Klikki.
The WordPress version affected by the flaw are the 4.2, 4.1.2, 4.1.1, 3.9.3 (Tested with MySQL versions 5.1.53 and 5.5.41).
The researcher also posted a Video PoC in the post:
Below a text comment that could be used to test the flaw:
<a title='x onmouseover=alert(unescape(/hello%20world/.source)) style=position:absolute;left:0;top:0;width:5000px;height:5000px AAAAAAAAAAAA...[64 kb]..AAA'></a>
The expert explained that WordPress hasn’t recognized the security flaw since it was first submitted in November of 2014 via the CERT-FI and HackerOne.
WordPress already released the version 4.2.1, the critical update that fixes the flaw. Website administrators urge to update their WordPress as soon as possible, and automatic updates have started to roll out. The security advisory issued by WordPress confirmed that its team was made aware of the cross-site scripting flaw a few hours ago, the vulnerability was discovered by
Download WordPress 4.2.1 or venture over to Dashboard → Updates and simply click “Update Now”.
(Security Affairs – WordPress, XSS)