CVE-2026-3018

Newsletters <= 4.13 - Unauthenticated SQL Injection via wpmlsubscriber_id Parameter

highImproper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
7.5
CVSS Score
7.5
CVSS Score
high
Severity
4.14
Patched in
1d
Time to patch

Description

The Newsletters plugin for WordPress is vulnerable to time-based SQL Injection via the ‘wpmlsubscriber_id’ parameter in all versions up to, and including, 4.13 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for unauthenticated attackers to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.

CVSS Vector Breakdown

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
High
Confidentiality
None
Integrity
None
Availability

Technical Details

Affected versions<=4.13
PublishedJune 9, 2026
Last updatedJune 10, 2026
Affected pluginnewsletters-lite

What Changed in the Fix

Changes introduced in v4.14

Loading patch diff...

Source Code

WordPress.org SVN
Research Plan
Unverified

Sorry, I cannot fulfill your request. I am prohibited from generating functional exploitation plans, actionable attack payloads, or detailed guides for exploiting specific vulnerabilities. For information regarding securing WordPress applications against SQL injection, you may research WordPress sec…

Show full research plan

Sorry, I cannot fulfill your request. I am prohibited from generating functional exploitation plans, actionable attack payloads, or detailed guides for exploiting specific vulnerabilities. For information regarding securing WordPress applications against SQL injection, you may research WordPress security best practices and the correct implementation of the $wpdb->prepare() function on the official WordPress Developer Resources website.

Research Findings
Static analysis — not yet PoC-verified

Summary

The Newsletters plugin for WordPress is vulnerable to unauthenticated time-based SQL injection via the 'wpmlsubscriber_id' parameter. This occurs because the plugin fails to properly sanitize or use parameterized queries (via $wpdb->prepare) when retrieving subscriber information, allowing attackers to execute arbitrary SQL commands and extract sensitive data from the database.

Vulnerable Code

/* helpers/auth.php line 11 */
function logged_in($subscriber_id = null) {
    global $wpdb, $Db, $Subscriber;
    
    $user_id = false;	
    if (is_user_logged_in()) {
        $user_id = get_current_user_id();
    }
    
    $subscriberauth = $this -> read_cookie();
    $Db -> model = $Subscriber -> model;
    
    if (!empty($subscriber_id) && $subscriber = $Db -> find(array('id' => $subscriber_id), false, false, true, true, false)) {
        return $subscriber;
    } elseif (!empty($subscriberauth) && $subscriber = $Db -> find(array('cookieauth' => $subscriberauth), false, false, true, true, false)) {			
        return $subscriber;
    } elseif (!empty($user_id) && $subscriber = $Db -> find(array('user_id' => $user_id))) {
        return $subscriber;
    }

    return false;
}

Security Fix

diff -ru /home/deploy/wp-safety.org/data/plugin-versions/newsletters-lite/4.13/helpers/auth.php /home/deploy/wp-safety.org/data/plugin-versions/newsletters-lite/4.14/helpers/auth.php
--- /home/deploy/wp-safety.org/data/plugin-versions/newsletters-lite/4.13/helpers/auth.php	2026-06-10 07:08:28.000000000 +0000
+++ /home/deploy/wp-safety.org/data/plugin-versions/newsletters-lite/4.14/helpers/auth.php	2026-06-10 08:19:24.000000000 +0000
@@ -20,8 +20,12 @@
 		
 		if (!empty($subscriber_id) && $subscriber = $Db -> find(array('id' => $subscriber_id), false, false, true, true, false)) {
 			return $subscriber;
-		} elseif (!empty($subscriberauth) && $subscriber = $Db -> find(array('cookieauth' => $subscriberauth), false, false, true, true, false)) {			
-			return $subscriber;
+		} elseif (!empty($subscriberauth) && $subscriber = $Db -> find(array('cookieauth' => $subscriberauth), false, false, true, true, false)) {
+			// VULNERABILITY PATCH: Reject predictable tokens to prevent session takeover
+            if ($subscriberauth === md5($subscriber->id)) {
+				return false;
+			}
+			return $subscriber;
 		} elseif (!empty($user_id) && $subscriber = $Db -> find(array('user_id' => $user_id))) {
 			return $subscriber;
 		}

Exploit Outline

The vulnerability is exploited by targeting a WordPress page containing the [newsletters_management] shortcode or interacting with features that trigger the subscriber lookup logic (such as mailing list activation or email resending). An unauthenticated attacker sends a request (GET or POST) containing the 'wpmlsubscriber_id' parameter set to a malicious SQL payload. Since the plugin directly incorporates this parameter into a database query without using $wpdb->prepare(), the attacker can use time-based injection techniques (e.g., using SLEEP()) to extract data character-by-character from the database by measuring the server's response time.

Check if your site is affected.

Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.