SEVERITY NOT PROVIDED

GO-2026-6909: Nil-pointer panic in validateAssertion and namespace-blind Subject.NameID in github.com/crewjam/saml

Published 2026-11-05 · Updated 2026-11-23

Summary

The github.com/crewjam/saml library contains a nil-pointer dereference flaw causing panics and a namespace-blind XML parsing issue permitting Subject.NameID spoofing. Engineering teams using github.com/crewjam/saml in Go applications should upgrade to version 0.5.2.

Who is affected

Deployments using github.com/crewjam/saml prior to version 0.5.2 as a SAML Service Provider are affected. A signed SAML assertion that omits optional elements like Subject or Conditions triggers a nil-pointer dereference panic during validation. Additionally, an authenticated principal can spoof Subject.NameID.Value by providing a foreign namespace <NameID> element when <saml:NameID> is missing.

Exploitability

The CVSS severity vector and base score are not provided for this record, and EPSS data is not yet available. CISA Known Exploited Vulnerabilities confirms there is no reported active exploitation in the wild.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-24. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
Go github.com/crewjam/saml >= 0, < 0.5.2 0.5.2 go get github.com/crewjam/[email protected]

FAQ

What causes the nil-pointer dereference panic in validateAssertion?

ServiceProvider.validateAssertion dereferences assertion.Subject, assertion.Conditions, and SubjectConfirmationData without checking for nil values when signed SAML assertions omit these optional elements.

How does the Subject.NameID spoofing vulnerability occur?

The Subject struct uses a bare xml:"NameID" tag that matches elements in any XML namespace, allowing an authenticated user to populate Subject.NameID from a foreign namespace element when <saml:NameID> is omitted.

Are there any documented workarounds for GO-2026-6909?

Workarounds are not documented; upgrading to version 0.5.2 is required to remediate both flaws.

Original advisory description
github.com/crewjam/saml before v0.5.2 contains two vulnerabilities in SAML assertion processing: 1. ServiceProvider.validateAssertion dereferences assertion.Subject, assertion.Conditions, and SubjectConfirmationData without nil checks. A signed SAML assertion that omits any of these optional elements causes a nil-pointer dereference panic after signature verification. 2. Subject uses the bare XML struct tag xml:"NameID", which matches <NameID> elements in any XML namespace. When a signed assertion omits <saml:NameID> and includes a <NameID> element in a foreign namespace inside <saml:Subject>, encoding/xml populates Subject.NameID from the foreign element, allowing an authenticated principal to spoof Subject.NameID.Value.

References

Source records: GO-2026-6909 (OSV.dev).