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.

ABTV //

Malware

4/9/2019
09:10 AM
Larry Loeb
Larry Loeb
Larry Loeb
50%
50%

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
Comments
Oldest First  |  Newest First  |  Threaded View
COVID-19: Latest Security News & Commentary
Dark Reading Staff 8/14/2020
Lock-Pickers Face an Uncertain Future Online
Seth Rosenblatt, Contributing Writer,  8/10/2020
Hacking It as a CISO: Advice for Security Leadership
Kelly Sheridan, Staff Editor, Dark Reading,  8/10/2020
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
7 New Cybersecurity Vulnerabilities That Could Put Your Enterprise at Risk
In this Dark Reading Tech Digest, we look at the ways security researchers and ethical hackers find critical vulnerabilities and offer insights into how you can fix them before attackers can exploit them.
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
CVE-2020-17475
PUBLISHED: 2020-08-14
Lack of authentication in the network relays used in MEGVII Koala 2.9.1-c3s allows attackers to grant physical access to anyone by sending packet data to UDP port 5000.
CVE-2020-0255
PUBLISHED: 2020-08-14
** REJECT ** DO NOT USE THIS CANDIDATE NUMBER. ConsultIDs: CVE-2020-10751. Reason: This candidate is a duplicate of CVE-2020-10751. Notes: All CVE users should reference CVE-2020-10751 instead of this candidate. All references and descriptions in this candidate have been removed to prevent accidenta...
CVE-2020-14353
PUBLISHED: 2020-08-14
** REJECT ** DO NOT USE THIS CANDIDATE NUMBER. ConsultIDs: CVE-2017-18270. Reason: This candidate is a duplicate of CVE-2017-18270. Notes: All CVE users should reference CVE-2017-18270 instead of this candidate. All references and descriptions in this candidate have been removed to prevent accidenta...
CVE-2020-17464
PUBLISHED: 2020-08-14
** REJECT ** DO NOT USE THIS CANDIDATE NUMBER. ConsultIDs: none. Reason: This candidate was withdrawn by its CNA. Further investigation showed that it was not a security issue. Notes: none.
CVE-2020-17473
PUBLISHED: 2020-08-14
Lack of mutual authentication in ZKTeco FaceDepot 7B 1.0.213 and ZKBiosecurity Server 1.0.0_20190723 allows an attacker to obtain a long-lasting token by impersonating the server.