WordPress 4.2.1 is now available. This is a critical security release for all previous versions and we strongly encourage you to update your sites immediately.
Posted April 27, 2015 by Gary Pendergast. Filed under Releases, Security.
A few hours ago, the WordPress team was made aware of a cross-site scripting vulnerability, which could enable commenters to compromise a site. The vulnerability was discovered by Jouko Pynnƶnen.
WordPress 4.2.1 has begun to roll out as an automatic background update, for sites that support those.
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ā.
WordPress 4.2 Stored XSS
April 26, 2015
Overview
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.
Details
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.
The vulnerability bears a similarity to the one reported by Cedric Van Bockhaven in 2014 (patched this week, after 14 months). Instead of using an invalid character to truncate the comment, this time an excessively long comment is used for the same effect.
In these two cases, the injected JavaScript apparently can’t be triggered in the administrative Dashboard so these exploits seem to require getting around comment moderation e.g. by posting one harmless comment first.
The similar vulnerability released by Klikki in November 2014 could be exploited in the administrative Dashboard while the comment is still in the moderation queue. Some exploit attempts of this have been recently reported in the wild. HaTTiP
HaTTiP 2Ā Mark MaunderĀ Wordfence Founder & CEO:
Regards,