Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.



09:10 AM
Larry Loeb
Larry Loeb
Larry Loeb

WordPress Vulnerable to SQL Injection

Security firm Securi has found out that on WordPress versions earlier than 3.4 it will allow an SQL injection vulnerability to occur.

Duplicate Page is an open source pluginfor WordPress that does just what you think it will do. It duplicates pages. There are over 800,000 installations of the plugin. It will duplicate pages, posts and custom posts with one click also saving the selected options (draft, private, public, pending).

But security firm Securi has found out that on WordPress versions earlier than 3.4, it will also allow an SQL injection vulnerability to occur.

The bug is important because it is exploitable by any user with an account on the vulnerable site regardless of the privileges they may have (that means subscribers) and is easy to exploit. This bug can allow attackers to steal sensitive user information such as password hashes. It could also lead to a complete compromise of the vulnerable WordPress installation.

Depending on what other plugins are active on the site, this bug can be forced into a PHP Object Injection vulnerability.

Digging a little deeper here, it can been seen that the plugin relies on an admin_action_ hook which is executed at the very end of wp-admin/admin.php. This means that it may be executed when any kind of user is on their dashboard, or even when they are editing their personal information.

A plugin that uses this kind of syntax should routinely do additional privilege and nonce checks to verify that it is not executed by less privileged malicious users.

But that checking does not seem to be happening.

The variable $post_id of the post to be duplicated is assumed to be an integer. That means no matter what value is in $post_id, it will retrieve a valid post if the contents start with the post's ID. For example, "456 garbage" in the $post_id would grab a post whose ID is 456.

There's more. $post_id is directly appended to the $wpdb->get_results() query. Since $post_id can contain unsanitized user input (the "garbage" we added), this means there is an SQL Injection vulnerability.

The values returned by this vulnerable query are re-used in a foreach() loop and are re-appended in the subsequent INSERT SQL query. This means that an attacker can inject arbitrary values in the postmeta table. There you have the elements needed for a PHP Object Injection attack.

Pulling back from the low-levels mechanisms here, what can be done to mitigate?

First, get Duplicate Page 3.4 or better. This bug was first fixed in that release. Also, version 3.5 of the Duplicate Page plug is advised, since it has been tested and checked for the absence of the vulnerability.

— Larry Loeb has written for many of the last century's major "dead tree" computer magazines, having been, among other things, a consulting editor for BYTE magazine and senior editor for the launch of WebWeek.

Comment  | 
Print  | 
More Insights
Newest First  |  Oldest First  |  Threaded View
COVID-19: Latest Security News & Commentary
Dark Reading Staff 8/10/2020
Pen Testers Who Got Arrested Doing Their Jobs Tell All
Kelly Jackson Higgins, Executive Editor at Dark Reading,  8/5/2020
Researcher Finds New Office Macro Attacks for MacOS
Curtis Franklin Jr., Senior Editor at Dark Reading,  8/7/2020
Register for Dark Reading Newsletters
White Papers
Cartoon Contest
Current Issue
Special Report: Computing's New Normal, a Dark Reading Perspective
This special report examines how IT security organizations have adapted to the "new normal" of computing and what the long-term effects will be. Read it and get a unique set of perspectives on issues ranging from new threats & vulnerabilities as a result of remote working to how enterprise security strategy will be affected long term.
Flash Poll
The Changing Face of Threat Intelligence
The Changing Face of Threat Intelligence
This special report takes a look at how enterprises are using threat intelligence, as well as emerging best practices for integrating threat intel into security operations and incident response. Download it today!
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
PUBLISHED: 2020-08-11
A Cross-Site Request Forgery (CSRF) vulnerability was discovered in the System Management Interface Web component of Avaya Aura Communication Manager and Avaya Aura Messaging. This vulnerability could allow an unauthenticated remote attacker to perform Web administration actions with the privileged ...
PUBLISHED: 2020-08-11
An issue was discovered in certain configurations of GNOME gnome-shell through 3.36.4. When logging out of an account, the password box from the login dialog reappears with the password still visible. If the user had decided to have the password shown in cleartext at login time, it is then visible f...
PUBLISHED: 2020-08-11
django-celery-results through 1.2.1 stores task results in the database. Among the data it stores are the variables passed into the tasks. The variables may contain sensitive cleartext information that does not belong unencrypted in the database.
PUBLISHED: 2020-08-11
There is a possible out of bounds read due to an incorrect bounds check.Product: AndroidVersions: Android SoCAndroid ID: A-152225183
PUBLISHED: 2020-08-11
The Temi application 1.3.3 through 1.3.7931 for Android has hard-coded credentials.