CVE-2026-126721
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
CVSS 7.5 · High · EPSS 0.5%
Compare with your installed version
Affected products and known fixed versions are public information. Compare them with your installed version.
- magic login mail or qr codeNo fix published
Assess your server’s risks
The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.
Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.
curl -fsSL https://patchfirst.dev/check.sh | shChannels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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['HTTP_HOST']` value — with no validation against the site's configured origin via `home_url()` or `site_url()` — when `get_the_permalink()` returns empty or false, allowing an attacker-controlled Host header to become the URL origin of the magic-login link generated by `generate_url()` and delivered to the target via `wp_mail()`. 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 `autologin_via_url()` to call `wp_set_auth_cookie()` and establish a full Administrator session on the targeted account. Exploitation requires the `[magic_login]` shortcode to render on a path where `get_the_permalink()` 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.
- Published
- Updated
Affected products and versions
magic login mail or qr code
- Versions
- ≥ 0, ≤ 2.07: Affected (semver)
No fix published
Original sources
- https://www.wordfence.com/threat-intel/vulnerabilities/id/6059c493-fcdd-49c0-9a32-7e47cd76e2a3?source=cve
- https://plugins.trac.wordpress.org/browser/magic-login-mail/tags/2.07/lib/class-magicloginmail.php#L198
- https://plugins.trac.wordpress.org/browser/magic-login-mail/tags/2.07/lib/class-magicloginmail.php#L76
- https://plugins.trac.wordpress.org/browser/magic-login-mail/tags/2.07/lib/class-magicloginmail.php#L414
- https://plugins.trac.wordpress.org/browser/magic-login-mail/tags/2.07/lib/class-magicloginmail.php#L269
- https://plugins.trac.wordpress.org/browser/magic-login-mail/tags/2.07/lib/class-magicloginmail.php#L172
- https://plugins.trac.wordpress.org/changeset?reponame=&old=3797196%40magic-login-mail&new=3797196%40magic-login-mail
- https://nvd.nist.gov/vuln/detail/CVE-2026-126721