hn.today

SAML: A Fractal of Bad Design

blog.trailofbits.com170 points95 comments
Screenshot of SAML: A Fractal of Bad Design

SAML is presented as a legacy, XML-based authentication protocol that seeded the modern single sign-on industry but is now brittle and overdue for retirement. Originating in 2002 and widely adopted by universities and early SSO vendors, it became the backbone for numerous commercial identity products. Its complexity stems from XML itself - namespaces, DOCTYPEs, CDATA, schemas - and from a committee-driven "kitchen-sink" specification that supports many rarely used features. That complexity made SAML attractive for early deployment but difficult to implement correctly and expensive to audit; the author relates real-world experience building SSO infrastructure on simpleSAMLphp and encountering class-defining attacks along the way.

The central argument is that SAML’s design choices produce predictable, recurring security failures: XML-related vulnerabilities (XXE, entity expansion, DTD retrieval, XPath/XSLT injection), fragile canonicalization, and enveloped signatures that defeat reliable hash and signature checks. These flaws enable XML signature wrapping, parser-differential and round-trip attacks demonstrated in research and incidents from 2012 through 2025. Combined with spec ossification and transport-agnostic complexity, SAML is portrayed as a "fractal of bad design." The concrete recommendation is to deprecate SAML in favor of modern alternatives like OpenID Connect and JWT, which leverage JSON, detached signatures, HTTP assumptions, and a much smaller, safer surface.

Read on blog.trailofbits.com95 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Security

AI Exec: We May Have Pulled Off "The Largest Theft of Labor in Human History"

AI Exec: We May Have Pulled Off "The Largest Theft of Labor in Human History"

Documents from a lawsuit reveal that AI companies like OpenAI and Microsoft may have committed the largest theft of labor in history by training their models on copyrighted content without permission. Executives discussed concerns about AI's potential to destabilize the economy and the internet, highlighting unfiltered views on legal and ethical issues. (motherjones.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.