Overview
WP Simple SAML (humanmade/wp-simple-saml, confirmed on 0.5.5 and current master) initializes the onelogin/php-saml toolkit without enabling strict mode and without requiring signed assertions.
In inc/admin/namespace.php, get_config() never sets strict nor a security block, so the toolkit default (strict = false) applies. In Response.php, the entire validation block — InResponseTo, Destination, Audience, Issuer, NotOnOrAfter expiry, SubjectConfirmation, signature enforcement — is gated behind isStrict() and never runs. Independently, inc/namespace.php calls processResponse() with no request ID, so the one-time-use check is skipped even if strict mode were enabled.
A correctly IdP-signed SAMLResponse is therefore accepted regardless of when it expired, how many times it was used, which audience it targeted, or which SP it was issued for.
Prerequisites
- WordPress with WP Simple SAML 0.5.5 (or
masterat disclosure time). - One valid, IdP-signed
SAMLResponsefor the target identity. Sources: local-network capture, proxy/access logs, HAR capture, browser cache, plugin debug output, a Referer leak, or any other application federated to the same IdP.
Steps
- Capture a legitimately signed
SAMLResponse(it travels once, in the POST body to the ACS endpoint/sso/verify). - Replay it to
/sso/verify, including after itsNotOnOrAfter, as many times as needed. - Get a session for the asserted identity, up to administrator. Signature is still required, so this is not blind forgery.
- On a shared IdP, an assertion issued for another SP is accepted too (audience/issuer confusion).
Lab evidence
Disclosed as a coordinated private disclosure; no live third-party system was tested. The finding comes from source review plus a self-hosted Docker lab (WordPress + wp-simple-saml + SimpleSAMLphp IdP). In the lab, an assertion expired at 16:32:19Z was replayed ~10 minutes later and still returned 302 -> /wp-admin/ with a fresh authenticated session.
Validation
A verifier should reject an assertion outside its validity window and bind it to the expected audience and recipient:
from datetime import datetime, timezone
def assertion_is_fresh(not_before: datetime, not_on_or_after: datetime) -> bool:
now = datetime.now(timezone.utc)
return not_before <= now < not_on_or_after
def require_audience(actual: str, expected: str) -> None:
if actual != expected:
raise ValueError("unexpected SAML audience")
A safe black-box check uses a synthetic account and an expired fixture; the expected result is a denial, not a second session.
Impact
Authentication bypass to the asserted identity, up to WordPress administrator, leading to account takeover. MFA does not help: the captured assertion is already post-MFA, and the IdP is never consulted again. An assertion signed for a different application on the same IdP is also accepted.
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N = 9.2 (Critical) — AT:P reflects that one valid signed assertion must be obtained first. (CVSS 3.1 equivalent: AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H = 7.5.)
CWE-1188 (Insecure Default Initialization) · CWE-294 (Authentication Bypass by Capture-Replay) · CWE-347 (Improper Verification of Cryptographic Signature).
Mitigation
- In
get_config(), before returning the settings, enable strict mode and signing enforcement:$settings['strict'] = true; $settings['security'] = array_merge( $settings['security'] ?? [], [ 'wantAssertionsSigned' => true, 'wantXMLValidation' => true, ] ); - Enforce one-time use: persist the
AuthnRequestID at login and pass it toprocessResponse( $request_id ). Anullrequest ID makes the toolkit skip the check instead of failing it. Strict mode alone still allows replay of a still-valid assertion. - Restrict auto-provisioning to an allowlisted email domain.