PoC: miniOrange OTP Verification <=5.5.7 unauthenticated Account Takeover via OTP re-routing (CVSS 9.8)
CVSS: 9.8 (Critical) Affected: miniOrange OTP Verification (WordPress plugin) ≤ 5.5.7 Patched in: 5.5.8 Researcher: KevineCharles Status: Publicly disclosed by Patchstack (advisory) — this repository is published after public disclosure, in line with responsible disclosure practice.
The miniOrange OTP Verification plugin supports a "Login with only OTP"
mode where a user authenticates to wp-login.php using only their
username and a phone-based OTP challenge (no password required). The
plugin fails to verify that the phone number supplied for the OTP
challenge actually belongs to the account the session is bound to.
An unauthenticated attacker who only knows a victim's username can:
wordpress_logged_in_* cookie for the victim's
account.The attacker never needs the victim's password or real phone number.
File: handler/forms/class-wploginform.php
mo_handle_wp_login_ajax_send_otp() reads $_POST['user_phone']
directly and triggers the OTP send without ever checking that this
phone number belongs to the account bound to the current session
(login_user_mo).mo_handle_wp_login_ajax_form_validate_action() only checks internal
consistency — that the phone number submitted for validation matches
the one used to generate the challenge. It never checks the submitted
phone number against the victim's actually registered phone number
(get_user_meta($victim_id, 'mo_login_phone', true)).owner === submitted_username AND status === VALIDATED
Both of these values are entirely attacker-controlled (owner is set
from the plain-text log field in step 1, status is set by the
plugin's own OTP-validate endpoint, which the attacker also calls).In short: the plugin verifies that a phone number OTP challenge was completed, but never verifies that the victim's phone number was the one actually used.
Precondition: the target has "Login with only OTP" (phone verification, skip-password login) enabled, and the victim account has a registered phone number. The attacker needs only the victim's WordPress username and a phone number they control to receive SMS on.
POST /wp-login.php with log=<victim>&pwd= (empty password) →
opens/binds a PHP session to the victim's username.GET /wp-login.php → extract the anonymous CSRF nonce
mopopup_wpnonce (action mo_popup_options). WordPress nonces for
anonymous (uid 0) visitors are identical for every logged-out
visitor within the same ~12h tick, so any attacker can obtain one.POST /wp-login.php with
mo_external_popup_option=miniorange-ajax-otp-generate&mopopup_wpnonce=<nonce>&user_phone=<ATTACKER PHONE>
→ an OTP is generated and sent, but routed to the attacker's
phone number while the challenge stays bound to the victim's
session.POST /wp-login.php with
mo_external_popup_option=miniorange-ajax-otp-validate&mopopup_wpnonce=<nonce>&user_phone=<ATTACKER PHONE>&mo_otp_token=<CODE RECEIVED>
→ the challenge is marked VALIDATED for the victim's username.POST /wp-login.php with log=<victim>&pwd= → HTTP 302 and a
wordpress_logged_in_* cookie is issued for the victim account.The finding was confirmed against a local WordPress test instance with two negative controls, demonstrating that the only missing check is "does the phone number belong to the victim account" — not a total bypass of the 2FA flow:
wordpress_logged_in_* cookie is issued (2FA is correctly enforced
in the normal case).WPOTPERR010 - The phone number OTP was sent to and the phone number in contact submission do not match. This proves the plugin checks
internal consistency between its own generate/validate calls, but
never cross-checks against the victim's real registered phone
number — exactly the gap this vulnerability exploits.Raw HTTP evidence from this local reproduction (redacted of session
tokens) is included in evidence/.
python3 poc.py <base_url> <victim_username> <attacker_phone>
Example:
python3 poc.py https://victim-site.example admin 15555550123
The script performs steps 1–3 above, then pauses and asks you to enter
the OTP code received via SMS on <attacker_phone>, completes steps 4–5,
and prints the stolen wordpress_logged_in_* cookie along with a quick
profile.php check confirming the identity of the hijacked session.
Requires Python 3 standard library only (no third-party dependencies).
This repository is for educational and authorized security testing purposes only. Only use this PoC against systems you own or have explicit written authorization to test. The author is not responsible for any misuse.