Basic Google Maps Placemarks <= 1.10.7 - Missing Authorization to Unauthenticated Default Map Coordinate Update
Description
The Basic Google Maps Placemarks plugin for WordPress is vulnerable to authorization bypass in versions up to, and including, 1.10.7. This is due to the plugin not properly verifying that a user is authorized to perform an action. This makes it possible for unauthenticated attackers to modify stored map latitude and longitude options.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NTechnical Details
<=1.10.7What Changed in the Fix
Changes introduced in v1.10.8
Source Code
WordPress.org SVN# Vulnerability Research Plan: CVE-2026-3581 ## 1. Vulnerability Summary The **Basic Google Maps Placemarks** plugin (versions <= 1.10.7) contains a missing authorization vulnerability that allows unauthenticated attackers to modify the stored default map coordinates (latitude and longitude). The f…
Show full research plan
Vulnerability Research Plan: CVE-2026-3581
1. Vulnerability Summary
The Basic Google Maps Placemarks plugin (versions <= 1.10.7) contains a missing authorization vulnerability that allows unauthenticated attackers to modify the stored default map coordinates (latitude and longitude). The flaw exists in the BGMPSettings::updateMapCoordinates() method, which is hooked to init and fails to perform any capability checks or nonce verification before updating core plugin settings based on $_POST data.
2. Attack Vector Analysis
- Endpoint: Any WordPress URL (e.g.,
/,/wp-login.php, or/wp-admin/admin-ajax.php) because the vulnerable function is hooked toinit. - HTTP Method:
POST - Vulnerable Parameter:
bgmp_map-address - Authentication: None (Unauthenticated).
- Preconditions: The plugin must be active.
- Mechanism: The plugin attempts to "helpfully" update coordinates whenever the address is changed in settings. However, because it checks for the existence of
$_POST['bgmp_map-address']on every request via theinithook, an attacker can trigger the update logic by simply providing that key in a POST request.
3. Code Flow
- Entry Point:
core.phpinstantiatesBGMPSettingsin theBasicGoogleMapsPlacemarks::__constructmethod. - Hook Registration: In
settings.php, theBGMPSettings::__constructmethod registersupdateMapCoordinatesto theinithook:add_action( 'init', array( $this, 'updateMapCoordinates' ) ); - Vulnerable Sink: The
BGMPSettings::updateMapCoordinates()method (insettings.php) checks for user input:public function updateMapCoordinates() { global $bgmp; // ... if ( isset( $_POST[ BasicGoogleMapsPlacemarks::PREFIX . 'map-address' ] ) ) { // PREFIX = 'bgmp_' // ... logic to geocode the address ... if ( $haveCoordinates ) { update_option( BasicGoogleMapsPlacemarks::PREFIX . 'map-latitude', $coordinates['latitude'] ); update_option( BasicGoogleMapsPlacemarks::PREFIX . 'map-longitude', $coordinates['longitude'] ); } } } - Authorization Failure: There are no calls to
current_user_can(),check_admin_referer(), orwp_verify_nonce()beforeupdate_option()is called.
4. Nonce Acquisition Strategy
No nonce is required for this exploit.
The code in BGMPSettings::updateMapCoordinates lacks any nonce verification. It only checks for the presence of the bgmp_map-address key in the $_POST array.
5. Exploitation Strategy
- Determine Current Settings: (Optional) Use WP-CLI to check the current latitude and longitude to establish a baseline.
- Send Malicious Request: Send an unauthenticated
POSTrequest to the WordPress home page with a new address. - Payload:
- URL:
http://localhost:8888/(The root URL is sufficient). - Method:
POST - Body (Form-Encoded):
bgmp_map-address=New+York,NY
- URL:
- Backend Processing: The WordPress
inithook triggersupdateMapCoordinates. The plugin sees$_POST['bgmp_map-address'], geocodes "New York, NY", and updates thebgmp_map-latitudeandbgmp_map-longitudeoptions in thewp_optionstable.
6. Test Data Setup
- Install and activate the plugin:
wp plugin activate basic-google-maps-placemarks. - Set an initial coordinate baseline:
wp option update bgmp_map-latitude "47.6062095" wp option update bgmp_map-longitude "-122.3320708"
7. Expected Results
- The server will return a standard 200 OK (or redirect) as the
inithook executes and allows the page to load normally. - The database options
bgmp_map-latitudeandbgmp_map-longitudewill change from the baseline values to the coordinates of the injected address.
8. Verification Steps
After sending the HTTP request, verify the change using WP-CLI:
# Check updated latitude
wp option get bgmp_map-latitude
# Check updated longitude
wp option get bgmp_map-longitude
For "New York, NY", the latitude should be approximately 40.7127753 and longitude -74.0059728.
9. Alternative Approaches
If the plugin cannot geocode the address (e.g., if a Google Maps API key is missing or invalid), the code follows this path:
if ( $haveCoordinates ) {
// ...
} else {
update_option( BasicGoogleMapsPlacemarks::PREFIX . 'map-latitude', '' );
update_option( BasicGoogleMapsPlacemarks::PREFIX . 'map-longitude', '' );
}
In this scenario, an attacker can effectively wipe the map coordinates by sending an empty address or a gibberish address that cannot be geocoded:
- Payload:
bgmp_map-address=non_existent_location_12345 - Expected Result:
bgmp_map-latitudeandbgmp_map-longitudebecome empty strings, breaking the map display on the frontend.
Summary
The Basic Google Maps Placemarks plugin for WordPress (<= 1.10.7) is vulnerable to unauthorized modification of map settings. The `updateMapCoordinates` method, hooked to the early `init` action, fails to perform capability checks or nonce verification, allowing unauthenticated attackers to update the global map latitude and longitude or wipe them entirely.
Vulnerable Code
// settings.php line 36 add_action( 'init', array( $this, 'updateMapCoordinates' ) ); --- // settings.php lines 71-102 public function updateMapCoordinates() { // @todo - this could be done during a settings validation callback? global $bgmp; $haveCoordinates = true; if ( isset( $_POST[ BasicGoogleMapsPlacemarks::PREFIX . 'map-address' ] ) ) { if ( empty( $_POST[ BasicGoogleMapsPlacemarks::PREFIX . 'map-address' ] ) ) { $haveCoordinates = false; } else { $coordinates = $bgmp->geocode( $_POST[ BasicGoogleMapsPlacemarks::PREFIX . 'map-address' ] ); if ( ! $coordinates ) { $haveCoordinates = false; } } if ( $haveCoordinates ) { update_option( BasicGoogleMapsPlacemarks::PREFIX . 'map-latitude', $coordinates['latitude'] ); update_option( BasicGoogleMapsPlacemarks::PREFIX . 'map-longitude', $coordinates['longitude'] ); } else { // @todo - can't call protected from this class - $this->bgmp->enqueueMessage('That address couldn\'t be geocoded, please make sure that it\'s correct.', 'error' ); update_option( BasicGoogleMapsPlacemarks::PREFIX . 'map-latitude', '' ); // @todo - update these update_option( BasicGoogleMapsPlacemarks::PREFIX . 'map-longitude', '' ); } } }
Security Fix
@@ -78,6 +78,14 @@ // @todo - this could be done during a settings validation callback? global $bgmp; + if ( ! current_user_can( 'manage_options' ) ) { + return; + } + + if ( ! isset( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], BasicGoogleMapsPlacemarks::PREFIX . 'settings-options' ) ) { + return; + } + $haveCoordinates = true; if ( isset( $_POST[ BasicGoogleMapsPlacemarks::PREFIX . 'map-address' ] ) ) {
Exploit Outline
The exploit is achieved by sending an unauthenticated POST request to any URL on the WordPress site (as the vulnerable code is hooked to 'init'). The attacker provides a POST parameter 'bgmp_map-address' containing a geographic location (e.g., 'New York, NY'). The plugin's 'updateMapCoordinates' function detects this parameter, geocodes the address, and updates the 'bgmp_map-latitude' and 'bgmp_map-longitude' WordPress options. No nonces or user authentication are required to trigger this update. Additionally, providing an ungeocodeable address allows an attacker to clear the stored coordinates, effectively breaking the map on the frontend.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.