WordPress fixed a Zero Day a few hours after its disclosure

Pierluigi Paganini April 27, 2015

WordPress has just released a critical update to fix a serious XSS vulnerability that allows attackers to easily hijack websites based on the popular CMS.

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.

An attacker can exploit the flaw by leaving a javascript, greater than 64 KB in length, in the comment section that it executed when the comment approver views it.

“Current versions of WordPress are vulnerable to a stored XSS. An unauthenticated attacker can inject JavaScript in WordPress comments. The script is triggered when the comment is viewed. If triggered by a logged-in administrator, under default settings the attacker can leverage the vulnerability to execute arbitrary code on the server via the plugin and theme editors. Alternatively the attacker could change the administrator’s password, create new administrator accounts, or do whatever else the currently logged-in administrator can do on the target system.” wrote Klikki in a blog post (h/t Securi):

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.

wordpress xss

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

For more information, see the release notes or consult the list of changes.

Download WordPress 4.2.1 or venture over to Dashboard → Updates and simply click “Update Now”.

Pierluigi Paganini

(Security Affairs –  WordPress, XSS)



you might also like

leave a comment