Atomic Edge analysis of CVE-2026-126721 (metadata-based):
This vulnerability affects the Magic Login Mail or QR Code WordPress plugin through version 2.07. It is an unauthenticated privilege escalation and account takeover flaw. The plugin’s `curpageurl()` function falls back to the raw `$_SERVER[‘HTTP_HOST’]` header when `get_the_permalink()` returns empty or false. This allows an attacker to control the origin of magic-login URLs generated by `generate_url()` and delivered via `wp_mail()`. CVSS score 7.5 (High) reflects network attack vector, high complexity, no privileges required, user interaction required, and high confidentiality, integrity, and availability impact. CWE-269 (Improper Privilege Management) confirms the privilege escalation classification.
Root Cause: Atomic Edge analysis infers the root cause from the CWE and description. The `curpageurl()` function does not validate the Host header against the site’s configured origin (`home_url()` or `site_url()`) before using it to build the magic-login URL. When `get_the_permalink()` fails (e.g., on a 404 page or in a block-theme header template part), the function uses `$_SERVER[‘HTTP_HOST’]` directly. This is a classic host header injection issue. The description confirms the lack of validation and the fallback behavior. The exact code is not available for review; conclusions are inferred from the metadata.
Exploitation: An unauthenticated attacker sends a request to a page where the `[magic_login]` shortcode renders and `get_the_permalink()` returns empty or false. The request includes a crafted `Host` header pointing to an attacker-controlled domain. The plugin generates a magic-login link with that domain as the origin and emails it to the target administrator. When the administrator clicks the link, the one-time uid and token are sent to the attacker’s server (via the Host header domain). The attacker captures these values and replays them against the real site’s magic-login endpoint. The `autologin_via_url()` function then calls `wp_set_auth_cookie()`, establishing an authenticated session for the targeted administrator account. The attacker must know the administrator’s email address and the administrator must click the link. No specific AJAX action or REST route is named in the CVE metadata; the attack targets the shortcode rendering path.
Remediation: The fix in version 2.08 likely validates the Host header against the site’s configured origin (`home_url()` or `site_url()`) before using it in `curpageurl()`. Alternatively, the plugin should consistently use `home_url()` or `site_url()` to construct magic-login URLs rather than relying on `get_the_permalink()` or the Host header. The patch probably adds a check that the Host header matches the expected domain or uses a safe fallback. Atomic Edge research infers these remediation steps from the CWE and description.
Impact: Successful exploitation allows an attacker to take over a targeted administrator account on the WordPress site. The attacker gains full administrative control, including the ability to install plugins, modify content, create users, and potentially execute arbitrary code. The attacker cannot escalate their own account; they hijack an existing privileged account. The attack requires user interaction (administrator clicking the link) and knowledge of the administrator’s email address, which increases complexity but does not reduce the severity of the outcome.







