Categories: CloudSecurity

WordPress Unpatched XSS Bug Discovered

Finnish researchers have warned that the WordPress online publishing platform has an unpatched vulnerability that could allow malicious code to be injected into website comments.

The bug, which affects WordPress versions 4.2 and earlier, allows malicious JavaScript to be injected into a comment field, with the code being activated when the comment is viewed in a user’s browser, according to security firm Klikki Oy. The malicious code triggers a cross-site scripting (XSS) attack, that can steal user data, the company said in an advisory.

“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,” Klikki Oy said. “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.”

The problem is caused by a defect in the way WordPress handles overly long comments – those more than 64KB in size. When such comments are automatically truncated, the result is malformed HTML whose attributes can be controlled by the user posting the comment.

In order to reach the requisite size, a comment would need to be more than 65,000 characters in length, researchers said.

A limiting factor is that to go live, the malicious comment must bypass WordPress’ comment moderation features, meaning the attacker would need, for instance, to first post a harmless comment, Klikki Oy said.

The company released proof-of-concept code and a video demonstrating the exploit.

WordPress said it is preparing a fix, but did not disclose when it might arrive. Researchers recommended disabling comments or using the Akismet plugin to secure websites until a fix appears.

Popular attack target

The bug is similar to one reported in 2014, and which was patched only last week, after 14 months, according to Klikki Oy. That bug used an invalid character to trigger the exploit.

Cross-site scripting attacks account for the vast majority of web-based exploits, according to Symantec, and WordPress is a favourite target due to its status as the most widely used web content publishing system, powering more than 60 million websites. The FBI earlier this month warned that political extremists are currently targeting WordPress sites.

Dozens of WordPress plugins have been updated in recent days in order to patch a widespread XSS vulnerability that resulted from programmers’ incorrect use of two commonly used programming functions that modify or add query strings to web addresses. The updates were part of a coordinated response to an advisory earlier this month that brought the issue to light.

Are you a security pro? Try our quiz!

Matthew Broersma

Matt Broersma is a long standing tech freelance, who has worked for Ziff-Davis, ZDnet and other leading publications

Recent Posts

EU Widens Investigations Into Chinese Imports, Subsidies

After the United States imposes 100 percent tariffs on certain Chinese goods, Europe widens its…

2 days ago

Reddit Deal With OpenAI Gives ChatGPT Access To Content

OpenAI strikes deal with Reddit to train its AI tech on user posts and give…

2 days ago

Microsoft Invests 4 Billion Euros In France For AI, Cloud

Global spending spree from Microsoft continues, with huge investment for new data centre to drive…

2 days ago

Toshiba Axes 4,000 Staff In Post-Delisting Restructuring Operation

Workforce blow. Newly privatised Toshiba has embarked on a 'revitalisation plan' that will entail the…

3 days ago

European Union Opens Child Safety Probe Into Meta

European Commission opens an official child safety investigation into Facebook and Instagram-owner Meta Platforms

3 days ago