CVE-2026-126721: Magic Login Mail or QR Code <= 2.07 - Unauthenticated Privilege Escalation via Account Takeover to Host Header Injection in curpageurl() Magic-Login URL
The Magic Login Mail or QR Code plugin for WordPress is vulnerable to Privilege Escalation via Administrator Account Takeover in versions up to, and including, 2.07. This is due to the curpageurl() function falling back to the raw $SERVER['HTTPHOST'] value — with no validation against the site's configured origin via homeurl() or siteurl() — when getthepermalink() returns empty or false, allowing an attacker-controlled Host header to become the URL origin of the magic-login link generated by generateurl() and delivered to the target via wpmail(). This makes it possible for unauthenticated attackers to intercept the one-time uid and token pair sent to a targeted Administrator's email and replay them against the real site, causing autologinviaurl() to call wpsetauthcookie() and establish a full Administrator session on the targeted account. Exploitation requires the [magiclogin] shortcode to render on a path where getthepermalink() returns empty or false (such as a 404 page or a block-theme header template part), the web server to forward non-canonical Host headers, the attacker to know the target administrator's email address, and the administrator to click the attacker-originated magic-login link. Successful exploitation gives the attacker control of a distinct, already-privileged Administrator account; it does not promote the attacker's original account. Successful exploitation additionally requires an action by an administrator — the attacker cannot trigger the vulnerability on their own.
Affected Software
Event History
Frequently Asked Questions
What conditions must be present for exploitation?
The [magic_login] shortcode must render on a path where get_the_permalink() is empty or false, such as a 404 page or block-theme header template part. The web server must forward non-canonical Host headers, and the attacker must know the target administrator's email address.
Is authentication required to start the attack?
No. The issue is exploitable by an unauthenticated attacker, although exploitation also requires the affected shortcode placement, Host-header handling, and knowledge of an administrator email address.
What is the impact if exploitation succeeds?
An attacker can intercept the one-time uid and token pair from a magic-login link and replay it against the real site. This causes WordPress to establish a full Administrator session for the targeted account.
Which versions are affected?
Versions up to and including 2.07 are affected.