SAML Authentication Bypass: Why It Keeps Happening in 2026
SAML authentication bypass bugs keep hitting production SSO in 2026. See the real CVEs, root causes, and a developer checklist to stop them before launch.
By Babul Jack
A SAML authentication bypass happens when a service provider accepts a forged or unsigned SAML assertion as valid, letting an attacker log in as any user without credentials. In 2026 these bugs keep surfacing in real products — OpenAM, Drupal, WordPress — not because the SAML spec changed, but because implementations skip signature and claim validation steps that are easy to get wrong.
I've built SSO into B2B products for client projects, and SAML is always the integration that takes longest to trust. Not because the code is hard to write, but because the code that looks like it works and the code that is actually secure look identical in a demo. The bug only shows up when someone sends a response your library wasn't tested against — the same lesson I saw play out at the infrastructure layer in , where a patch meant to fix one issue quietly weakened another trust boundary.
Why SAML authentication bypass keeps happening in 2026
Most SAML bypasses are not flaws in the SAML 2.0 specification itself. They come from a mismatch between the part of the XML document a signature covers and the part an application actually reads to make an authentication decision.
This class of bug is called XML Signature Wrapping (XSW). An attacker duplicates or repositions an <Assertion> element inside a signed <Response>. The signature validator checks the original, untouched assertion and reports success. The application's business logic, however, navigates the XML tree with something like getElementsByTagName and picks up the attacker's cloned, unsigned assertion instead — often one that claims an admin username. The OWASP SAML Security Cheat Sheet has covered this exact failure mode since research first described it in 2012, and it is still the root cause behind modern parser-differential bypasses like the one GitHub Security Lab found in ruby-saml.
WorkOS summarized the underlying problem well in its October 2026 analysis of the Trail of Bits "SAML is a fractal of bad design" post: "Most modern SAML bypasses come from two parsers disagreeing about one document. The signature is valid, just over a different assertion than the one the application uses" (source). Two independently written XML parsers — one for signature verification, one for application logic — rarely canonicalize a document identically, and that gap is where attackers live.
Real SAML CVEs from the past few months
These aren't hypothetical. Three disclosures from mid-to-late 2026 show the range of ways assertion validation fails in production:
CVE-2026-123550 (OpenAM, CVSS 9.8 Critical) — The SAML v2.0 service provider in OpenAM did not enforce assertion signatures on its ECP (PAOS) and HTTP-Artifact bindings, because the default metadata setting WantAssertionsSigned was false. An unauthenticated attacker could submit an unsigned assertion and hijack a session for any mapped user, including administrators. Fixed in OpenAM 16.1.4 (advisory details).
CVE-2026-87946 (Drupal SAML SSO Service Provider module) — An observable timing discrepancy (CWE-208) in a secret-comparison routine let a remote, unauthenticated attacker recover authentication secrets byte by byte through response-time analysis. The fix moved the comparison to a constant-time routine (Drupal Security Advisory SA-CONTRIB-2026-144).
A WordPress SAML plugin bug (CVE-2026-82842) — disclosed September 20, 2026. The plugin ignored the site's configured attribute for linking an SSO identity to a local account and always matched on login name instead. Anyone who could get the identity provider to assert a chosen login name could sign in as that account, administrators included.
None of these three required breaking cryptography. They required skipping a check: enforce signing, use constant-time comparison, bind identity to a stable attribute. That pattern matters more than any individual CVE number.
How to prevent SAML authentication bypass: a developer checklist
If your application accepts SAML assertions directly, validate every one of the following before creating a session. Skipping any single item is a potential bypass.
Signature. Verify both the response and assertion signatures if present, against the certificate configured for that specific connection — never a global, shared certificate.
Issuer. Confirm <saml:Issuer> matches the entity ID you configured for that identity provider.
Audience restriction. Confirm <saml:AudienceRestriction> names your application's entity ID, so an assertion minted for a different service provider can't be replayed against yours.
Destination. Confirm the Destination attribute matches the exact Assertion Consumer Service URL that received the response.
Timestamps. Reject anything outside the NotBefore / NotOnOrAfter window, with a small clock-skew allowance (a few minutes, not hours).
InResponseTo. For SP-initiated flows, confirm it matches an AuthnRequest ID your application actually sent and is still tracking.
Signature algorithm. Reject SHA-1-signed assertions. Require RSA-SHA256 or stronger, and enforce an explicit allowlist rather than accepting whatever the message claims (OWASP cheat sheet reference).
Replay protection. Store processed assertion IDs in a shared cache (Redis, your database) and reject anything already seen. A per-process in-memory store silently fails behind a load balancer.
Two more controls that the 2026 disclosures specifically call out:
Link identities on a stable, admin-configured attribute, never a username or email the IdP can assert freely. That fallback is exactly what made the WordPress plugin exploitable.
Treat SSO configuration itself as a privileged surface. Metadata URLs, certificates, and WantAssertionsSigned toggles need the same access control as production secrets — the Drupal module's broader advisory batch in September 2026 started with improper access control on that configuration layer.
This checklist overlaps heavily with signature verification problems I see in payment webhook integrations — in a recent audit I wrote up the same category of bug for Stripe webhook signature verification failures, where skipping one validation step quietly turns a security control into a formality.
SAML vs OIDC: which is actually more secure?
OIDC uses signed JSON Web Tokens instead of XML, which removes the canonicalization and signature-wrapping problems specific to SAML. But "switch to OIDC" is not a silver bullet — it moves the attack surface, it doesn't remove it.
Layer
SAML
OIDC
Token format
Signed XML (XML-DSIG)
Signed JSON (JWS)
Canonicalization risk
High — XSW/parser-differential bugs
Low — no XML canonicalization step
IdP-initiated login
Native via RelayState
Supported via initiate_login_uri, less commonly configured
Signature verification bugs
ruby-saml, OpenAM, Drupal cases above
Still possible — see Microsoft's internal Titan service accepting an unsigned alg: none JWT, which exposed roughly 17 trillion rows before the fix
Mobile/SPA fit
Poor, browser POST round-trip
Strong, Authorization Code + PKCE
Enterprise IdP coverage in 2026
Still the default ask in enterprise security reviews
Growing, but SAML federations (InCommon, legacy AD FS) are not going away
The honest takeaway: OIDC removes one specific bug class (XML signature wrapping) but the surrounding layers — admin configuration, account linking, claim validation, token verification — still need the same discipline either protocol you pick. "Verify the signature first, with a pinned algorithm, before trusting any claim" is the fix for both the SAML and the JWT world.
Should you build SAML yourself or delegate it?
For founders and CTOs scoping an SSO feature, this is a real build-vs-buy decision, not just a security one. Writing your own XML signature verification is one of the highest-risk pieces of code in a typical SaaS codebase, because the bugs are nearly invisible in code review and only show up against a response crafted to exploit the parser gap.
In client projects, I generally recommend:
Use an actively maintained SAML library with a public security advisory history — never hand-roll XML signature verification. Pin and audit it the same way I'd recommend auditing any auth-adjacent dependency after a supply chain compromise.
If the roadmap allows it, offer OIDC first to customers whose identity provider supports it, and keep SAML as the option for enterprise buyers whose IT team requires it.
Put assertion validation, certificate rotation, and replay protection in one well-tested module, not scattered across route handlers.
If SSO security review is part of a larger compliance push (SOC 2, enterprise procurement), a focused security audit before launch catches the validation gaps above far cheaper than a post-incident forensic review does.
This isn't abstract advice. Every bypass covered above — OpenAM, Drupal, WordPress — was caused by a validation step someone decided was safe to skip. None required breaking cryptography.
Frequently asked questions
What is a SAML authentication bypass?
It's a vulnerability where a service provider accepts a SAML assertion it should reject — unsigned, forged, expired, or intended for a different application — and creates an authenticated session from it. The attacker never needs valid credentials; they only need the service provider's validation logic to have a gap.
Is SAML inherently insecure?
No. SAML's cryptography is sound when fully implemented. The risk comes from how much of the specification implementers have to parse and validate correctly; skipping any single check (signature, audience, timestamp, replay) creates a bypass. That's a consistency problem in implementations, not a flaw in the underlying protocol math.
Should I migrate from SAML to OIDC for security reasons?
OIDC removes XML canonicalization risk, which is a real class of SAML-specific bugs. But OIDC implementations still need rigorous signature and claim verification — an unsigned alg: none JWT caused a major 2026 data exposure at Microsoft. Treat protocol choice as one factor, not a replacement for careful validation.
How do I know if my SAML integration is vulnerable to XML Signature Wrapping?
Write negative test cases: submit assertions with no signature, a signature over a different element than the one your application reads, a mismatched audience, and a replayed assertion ID. If any of them create a session, you have a validation gap. Static code review alone rarely catches XSW bugs.
Does switching to a managed identity provider eliminate these risks?
It shifts the risk rather than eliminating it. A managed SSO platform centralizes signature verification, certificate rotation, and replay protection in code that's tested against many identity providers, which reduces the chance of a one-off implementation bug. You still own account linking, role mapping, and session management on your side.
Key takeaways
SAML authentication bypass bugs in 2026 (OpenAM, Drupal, WordPress) came from skipped validation steps, not broken cryptography.
XML Signature Wrapping remains the core SAML-specific bug class: the signature validator and the application logic must read the exact same signed element.
Validate signature, issuer, audience, destination, timestamps, and InResponseTo on every assertion — all of them, not a subset.
Use constant-time comparisons for secret validation and reject SHA-1-signed assertions.
Link identities on a stable, admin-controlled attribute, never a freely assertable username or email.
OIDC avoids XML canonicalization risk but introduces its own signature-verification responsibilities — protocol choice doesn't replace a validation checklist.
Treat SSO configuration (metadata, certificates, signing requirements) as a privileged surface with its own access control.