SAML: A fractal of bad design
A Trail of Bits researcher (ex-Duo Security engineer) traces SAML's history from its 2002 OASIS committee origins through recurring XML signature wrapping (XSW) and canonicalization/round-trip parser-differential attacks, arguing its reliance on brittle XML signature validation (libxmlsec) makes it fundamentally unsound. The post catalogs SAML's five structural flaws — XML complexity, canonicalization, enveloped signatures, kitchen-sink design, and protocol ossification — and recommends organizations deprecate SAML in favor of OIDC, citing Fly.io and Tailscale as vendors already holding the line on OIDC-only SSO.
Named attacks the summary omits
The post's core argument (five flaws, deprecate for OIDC, Fly.io/Tailscale holding the line) is already in the summary. What it does not carry is the concrete attack ledger and the two actionable engineering options. Those are the reason to read further.
The page anchors "SAML is unfixable in practice" to specific, mostly-2025 disclosures — evidence that parser-differential bypasses are a live wave, not history:
- XML comment bypass (Kelby Ludwig, 2018) — canonicalization handling of XML comments let an attacker alter the asserted identity.
- XML round-trip vulnerabilities in Go's standard library (2020).
- Abusing libxml2 quirks to bypass SAML authentication on GitHub Enterprise (2025).
- "Sign in as anyone: Bypassing SAML SSO authentication with parser differentials" (2025).
- "SAML roulette: the hacker always wins" (2025).
- "The Fragile Lock: Novel Bypasses For SAML Authentication" (2025).
The through-line: nearly all modern SAML attacks are parser-differential / round-trip bugs downstream of C14N and enveloped signatures, and most implementations wrap libxmlsec (or libxml2), a C codebase the post argues nobody audits. XSW from the 2012 "On Breaking SAML" paper is still present today.
What to do
Two concrete paths the page states:
If you must keep SAML — harden by rejecting anything that doesn't look like real-world traffic. Ptacek's rule: beyond standard SAML checks, reject any message that doesn't have the same shape as what Okta, OneLogin, Google, or Shibboleth generates. The premise: ~99% of real deployments use the same narrow subset, so ~90% of the spec's surface can be refused outright.
To migrate off SAML (as an IdP) — the stated deprecation sequence:
- Develop a deprecation plan and communicate it to customers.
- Stop onboarding new customers to SAML.
- Provide existing SAML customers equivalent OIDC configurations.
- Set a sunset date, then execute.
The one deployment edge where SAML historically won — SP and IdP that cannot talk directly (network segmentation / VPN era) — is covered by OIDC implicit flow with form post, so the page claims no remaining scenario requires SAML.
Caveats
The "kitchen-sink" and "built on XML" critiques are argument, not new findings — the author concedes XML was the only reasonable choice in 2002 and that the used subset has shifted over 20 years. The hardening rule and migration plan are quoted recommendations, not a tested procedure with results.
Organisations named here
- BeyondCorp
- billion laughs
- canonicalization (C14N)
- Kelby Ludwig
- OASIS SSTC
- On Breaking SAML: Be Whoever You Want to Be
- Thomas Ptacek
Technologies named here
- SAML
- simpleSAMLphp
- Duo Access Gateway
- XML
- Ping Identity
- OneLogin
- ADFS
- Okta
- Duo Security
- Shibboleth IdP
- Central Authentication Service
- libxmlsec
- libxml2
- Go standard library
- GitHub Enterprise
- OIDC
- JWT
Techniques named here
- XML signature wrapping
- XML comment bypass
- XXE
- Entity expansion
- DTD retrieval
- XPath/XQuery/XInclude/XSLT/CDATA injection
- Enveloped signature manipulation
Related in Identity & Access
Education Under Attack: The Pattern Behind Recent University Breaches
Next-Gen Phishing Tactics Users Aren’t Ready For | Huntress
.png)
Google API keys keep working after you delete them
