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
- Upgrade the github.com/crewjam/saml module dependency to version 0.5.2 or later.
- Rebuild and redeploy affected Go applications to ensure the updated dependency is in use.
How to check your project
- Inspect go.mod and go.sum files across Go projects for github.com/crewjam/saml versions lower than 0.5.2.
- Run `go list -m github.com/crewjam/saml` in the application environment to check the resolved package version.
Automated analysis of the published advisory data, generated 2026-11-24. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| 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
References
- FIX https://github.com/crewjam/saml/commit/2a4c1a630a7d53ff99a1fa2216308d6cef61ad78
- FIX https://github.com/crewjam/saml/commit/e05a6f148c4eda7b5f6b3b2737085cf72b680456
- REPORT https://github.com/golang/vulndb/issues/6909
Source records: GO-2026-6909 (OSV.dev).