GO-2026-6909
Not scored
Nil-pointer panic in validateAssertion and namespace-blind Subject.NameID in github.com/crewjam/saml
- Severity
- Not scored
- Published
- Last changed
Description
github.com/crewjam/saml before v0.5.2 contains two vulnerabilities in SAML assertion processing:
-
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.
-
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| github.com/crewjam/saml (Go) | before 0.5.2 | Go Vulnerability Database |
References
Sources
| Source | Record | Licence |
|---|---|---|
| Go Vulnerability Database | GO-2026-6909 changed 2026-11-23 | CC-BY-4.0 |