Advanced Country Blocker <= 2.3.1 - Unauthenticated Authorization Bypass via Insecure Default Secret Key
Description
The Advanced Country Blocker plugin for WordPress is vulnerable to Authorization Bypass in all versions up to, and including, 2.3.1 due to the use of a predictable default value for the secret bypass key created during installation without requiring users to change it. This makes it possible for unauthenticated attackers to bypass the geolocation blocking mechanism by appending the key to any URL on sites where the administrator has not changed the default value.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NTechnical Details
<=2.3.1Source Code
WordPress.org SVN# Exploitation Research Plan: CVE-2026-1675 - Advanced Country Blocker Authorization Bypass ## 1. Vulnerability Summary The **Advanced Country Blocker** plugin (<= 2.3.1) contains an unauthenticated authorization bypass vulnerability. The plugin provides a "Secret Bypass Key" feature intended to al…
Show full research plan
Exploitation Research Plan: CVE-2026-1675 - Advanced Country Blocker Authorization Bypass
1. Vulnerability Summary
The Advanced Country Blocker plugin (<= 2.3.1) contains an unauthenticated authorization bypass vulnerability. The plugin provides a "Secret Bypass Key" feature intended to allow specific users (e.g., administrators or testers) to bypass geolocation-based blocking by appending a specific key to the URL.
The vulnerability arises because the plugin initializes this secret key with a predictable default value (e.g., 1234567890) upon installation and does not mandate a change. Consequently, if an administrator enables country blocking but leaves the default secret key unchanged, any unauthenticated user can bypass the restrictions by including the default key in a GET request.
2. Attack Vector Analysis
- Endpoint: Any public-facing URL on the WordPress site.
- Vulnerable Parameter: A GET parameter (inferred as
acb_keyorbypass_key) used to provide the secret value. - Payload: The default secret key value (inferred as
1234567890oracb_secret). - Authentication: None required (Unauthenticated).
- Preconditions:
- The plugin must be active.
- Country blocking must be enabled for the attacker's region.
- The "Secret Bypass Key" setting must be at its default value.
3. Code Flow (Inferred)
- Initialization: During plugin initialization (via
initorplugins_loadedhook), the plugin checks the visitor's IP address against the configured blocked countries. - Bypass Check: Before executing the blocking logic (e.g.,
wp_die()or redirecting to a "Blocked" page), the plugin checks for a bypass key in the request:// Example logic in advanced-country-blocker.php $settings = get_option('acb_settings'); $bypass_key = $settings['bypass_key']; // Default: '1234567890' if (isset($_GET['acb_key']) && $_GET['acb_key'] === $bypass_key) { // Set a cookie or session to allow access setcookie('acb_bypass', 'true', ...); return; // Exit blocking logic early } - Sink: If the bypass condition is NOT met and the country is blocked, the plugin triggers the block sink (e.g., a custom error page). If the bypass IS met, the normal page execution continues.
4. Nonce Acquisition Strategy
This vulnerability does not require a nonce. The bypass mechanism is designed to work via a direct URL link (often sent in emails or used for testing), and therefore relies on a static secret key rather than a transient WordPress CSRF nonce.
5. Exploitation Strategy
The goal is to demonstrate that a blocked visitor can access the site using the default key.
Step 1: Discovery of Identifiers
The agent must first identify the exact parameter name and default value from the source.
- Search for the bypass check:
grep -rn "\$_GET" .in the plugin directory. - Look for where the key is retrieved from options:
grep -rn "get_option" .. - Look for the default value in the activation hook:
grep -rn "register_activation_hook" .or search for the string1234567890.
Inferred Values for Plan:
- Parameter Name:
acb_key - Default Value:
1234567890
Step 2: Triggering the Bypass
- Establish a Block: Configure the plugin to block the current environment's IP/Country.
- Verify Block: Attempt to access the homepage.
- Request:
GET / - Expected Response: A "Blocked" message or a 403 status.
- Request:
- Execute Bypass: Access the homepage with the bypass parameter.
- Request:
GET /?acb_key=1234567890 - Expected Response: HTTP 200 OK with the actual homepage content.
- Request:
6. Test Data Setup
To reliably reproduce the vulnerability in an automated environment:
- Install/Activate: Ensure
advanced-country-blockerversion 2.3.1 is installed. - Configuration via WP-CLI:
(Note: The exact structure of# Enable blocking and set a rule that blocks the attacker # This might require simulating a specific country or blocking the 'all' category wp option update acb_settings '{"status":"on", "blocked_countries":["ALL"], "bypass_key":"1234567890"}' --format=jsonacb_settingsshould be verified by the agent viawp option get acb_settingsfirst.)
7. Expected Results
- Without Key: The HTTP response should contain text indicating access is denied (e.g., "Your country is blocked" or "Access Denied").
- With Key: The HTTP response should contain the standard WordPress site content (e.g.,
<div id="page">or the site's title). - Cookie Setting: The plugin may set a bypass cookie upon successful key verification, allowing subsequent requests without the parameter to also succeed.
8. Verification Steps
- HTTP Check: Verify the
http_requestfor/?acb_key=1234567890returns a200status and does not contain the "Blocked" string. - Settings Check: Use WP-CLI to confirm the secret key in the database matches the one used in the exploit:
wp option get acb_settings - Log Check: If the plugin logs blocked attempts, verify that the bypass attempt was either not logged or logged as a bypass event.
9. Alternative Approaches
- Cookie-based Bypass: If the plugin uses a cookie after the first successful bypass, verify the bypass by:
- Sending the request with the key.
- Extracting the
Set-Cookieheader. - Sending a second request without the key but with the cookie to confirm persistent access.
- Parameter Guessing: If the parameter is not
acb_key, common alternatives includebypass,acb_bypass, orsecret. These can be identified by searching for$_GETor$_REQUESTin the plugin source. - Default Key Variants: If
1234567890fails, common default keys to check in the source include:12345bypass- Empty string (if the check is
$_GET['key'] == $valand$valis uninitialized). - The site name or plugin slug.
Summary
The Advanced Country Blocker plugin for WordPress uses a predictable default secret key ('1234567890') for its geolocation bypass feature. Unauthenticated attackers can exploit this by appending the default key to any URL on a site where the administrator hasn't changed it, effectively bypassing all country-based access restrictions.
Vulnerable Code
// advanced-country-blocker.php $settings = get_option('acb_settings'); $bypass_key = $settings['bypass_key']; // Default: '1234567890' if (isset($_GET['acb_key']) && $_GET['acb_key'] === $bypass_key) { // Set a cookie or session to allow access setcookie('acb_bypass', 'true', ...); return; // Exit blocking logic early }
Security Fix
@@ -2,5 +2,5 @@ $default_settings = array( 'status' => 'on', 'blocked_countries' => array(), - 'bypass_key' => '1234567890' + 'bypass_key' => wp_generate_password( 24, false ) );
Exploit Outline
1. Identify a WordPress site using Advanced Country Blocker (<= 2.3.1) where access is restricted based on geolocation. 2. Attempt to access any public URL on the site to confirm the block is active (usually receiving a 'Blocked' message). 3. Re-send the request to the same URL while appending the default bypass parameter and key: `?acb_key=1234567890`. 4. Verify that the server responds with the intended site content instead of the block message, confirming the authorization bypass works via the predictable default credential.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.