GO-2026-6909: Nil-pointer panic in validateAssertion and namespace-blind Subject.NameID in github.com/crewjam/saml
- Source:
- OSV.dev
- Published:
- Fetched:
- Updated:
- Affects:
- github.com/crewjam/saml
https://osv.dev/vulnerability/GO-2026-6909 ↗
Nil-pointer panic in validateAssertion and namespace-blind Subject.NameID in github.com/crewjam/saml 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 elements in any XML namespace. When a signed assertion omits and includes a element in a foreign namespace inside , encoding/xml populates Subject.NameID from the foreign element, allowing an authenticated principal to spoof Subject.NameID.Value. Affected: Go:github.com/crewjam/saml Fixed in: 0.5.2 References: https://github.com/crewjam/saml/commit/2a4c1a630a7d53ff99a1fa2216308d6cef61ad78 https://github.com/crewjam/saml/commit/e05a6f148c4eda7b5f6b3b2737085cf72b680456 https://github.com/golang/vulndb/issues/6909