Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is SAML?

SAML carries signed XML assertions about a user from an identity provider to an application, which is how most enterprise single sign-on has worked for twenty years.

Illustration for the cybersecurity term SAML
Home / Blog / Cybersecurity Terms / What Is SAML?
17 November 2026

What Is SAML?

What Is SAML?

SAML 2.0 has been an OASIS standard since 2005, which in protocol terms makes it venerable, and it still authenticates a large share of enterprise software. The Security Assertion Markup Language defines how one party makes a signed statement about a user and how another party verifies it—the mechanism behind the single sign-on experience in most HR systems, expense tools, and line-of-business applications bought before 2018.

Assertions and Who Issues Them

The identity provider authenticates the user and issues an assertion: an XML document stating who the subject is, when the statement was made, how long it is valid, what conditions apply, and what attributes the user has. It is signed with the identity provider’s private key, usually with an X.509 certificate exchanged in advance through metadata.

The service provider receives the assertion, verifies the signature against the certificate it holds, checks the conditions, and creates a session. No password reaches the service provider, which is the entire point.

Two flows exist. In service-provider-initiated sign-on, the user visits the application, is redirected to the identity provider, authenticates, and returns with the assertion. In identity-provider-initiated sign-on, the user starts at a portal and is sent to the application with an unsolicited assertion. The second is convenient and weaker, because there is no request for the response to be correlated against, which removes a defence against replay and injection. Prefer service-provider-initiated flows wherever the application supports them.

The Validation Checklist

Most SAML vulnerabilities are missing checks rather than broken cryptography. A service provider must confirm all of the following:

  1. The signature verifies against the expected certificate, and the signature covers the assertion—not merely some element of the document.
  2. The issuer matches the configured identity provider exactly.
  3. The audience restriction names this service provider.
  4. NotBefore and NotOnOrAfter bracket the current time, allowing minimal clock skew.
  5. The Destination and recipient match this assertion consumer service URL.
  6. The assertion identifier has not been seen before, so a captured assertion cannot be replayed.
  7. For service-provider-initiated flows, InResponseTo matches an authentication request this service provider actually issued.

XML Signature Wrapping

The attack class that has dogged SAML for fifteen years comes from a mismatch between the component that verifies the signature and the component that reads the data. An attacker takes a legitimate signed assertion, wraps it inside a crafted document, and adds a second assertion naming a different user. The signature verification library finds the original signed element and reports success; the application logic then reads the first assertion it encounters, which is the attacker’s.

Duo Security’s 2018 research found this pattern in multiple widely used SAML libraries, including a variant where XML comments inside the NameID element caused different parsers to extract different usernames—so [email protected] with a comment inserted could be read as a different account entirely. The lesson is to use a maintained library, keep it patched, and never process the assertion with a different parser from the one that validated it.

Golden SAML

If an attacker obtains the identity provider’s token-signing private key, they can mint assertions for any user, with any attributes, at any time. No authentication occurs, no failed login is recorded, and conditional access policies evaluated at the identity provider are never consulted.

This is Golden SAML, and it was a component of the SolarWinds intrusion disclosed in December 2020, where on-premises AD FS signing certificates were stolen and used to access cloud services as arbitrary users. The defences are to store signing material in a hardware security module, rotate it on a schedule and immediately after any suspicion of host compromise, treat the federation server as a tier-zero asset, and alert on assertions with unusual lifetimes or issuers. Our entry on identity provider federation risks covers the wider picture.

SAML or OpenID Connect?

For new work, OpenID Connect is easier to implement correctly: JSON rather than XML canonicalisation, better defined behaviour for mobile and single-page applications, and no XML signature processing to get wrong. SAML persists because thousands of enterprise applications support only SAML, and procurement cycles are long.

The pragmatic approach is a single identity provider that speaks both, translating between protocols so that your authentication policy, conditional access, and logging apply uniformly. Pair it with SCIM for provisioning, since SAML authenticates users but does not create or disable accounts in the target application—a gap that leaves leavers with working accounts in applications nobody deprovisioned.

At Privia Security, we test single sign-on integrations for signature wrapping and validation gaps in our web application security services.

FAQ – Frequently Asked Questions

Is SAML Obsolete?

No, though it is no longer the first choice for new development. Thousands of enterprise applications support SAML and nothing else, so most organisations will operate it for years. The practical approach is one identity provider that speaks both SAML and OpenID Connect, applying the same authentication policy and logging regardless of which protocol the application needs.

What Is XML Signature Wrapping?

An attack where a valid signed assertion is embedded inside a crafted document alongside a forged one. The signature verification code finds the genuine signed element and reports success, while the application logic reads the attacker’s assertion instead. It is a mismatch between what is verified and what is used, and it has affected several widely deployed SAML libraries.

Why Is Identity-Provider-Initiated Sign-On Weaker?

Because the assertion is unsolicited, there is no outstanding authentication request for the service provider to correlate it against. That removes the InResponseTo check, which is one of the defences against replaying or injecting a captured assertion. Use service-provider-initiated flows where the application supports them, and enforce assertion identifier replay protection in either case.

What Is Golden SAML?

A technique in which an attacker who has stolen the identity provider’s token-signing private key forges assertions for any user at will. Because no authentication takes place, nothing appears in sign-in logs and conditional access is never evaluated. Protect signing keys in hardware, rotate them after any suspected host compromise, and monitor assertions for unusual issuers or lifetimes.

Related Terms

You May Be Interested In These

What Is the HTTP/2 Rapid Reset Attack?

Cybersecurity Terms

17 November 2026

What Is the HTTP/2 Rapid Reset Attack?

Read More
What Is Cosign?

Cybersecurity Terms

17 November 2026

What Is Cosign?

Read More
What Is Patch Management?

Cybersecurity Terms

17 November 2026

What Is Patch Management?

Read More