github.com/crewjam/saml nil-pointer panic and namespace-blind NameID

Severity: info · Published 2026-11-05

The crewjam/saml library, used in Go applications for SAML authentication, contains two defects in how it processes SAML assertions from identity providers. First, a missing validation check can crash the application if an assertion lacks an Issuer element. Second, the library accepts identity spoofing through a foreign XML namespace element, allowing an attacker with a valid signature from the trusted identity provider to impersonate other users.

Technologies: github.com/crewjam/saml (Go). Vendors: Go.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Informational severity, published 5 November 2026.
Which products and versions are affected?
Crewjam Saml all versions through v0.5.1; github.com/crewjam/saml (Go) SEMVER:introduced=0.
Is there a fix for This vulnerability?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is This vulnerability attacked?
It is attacked over the network, in a software library.
Am I affected?
Check whether you run Crewjam Saml or github.com/crewjam/saml (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The library dereferences assertion.Issuer without nil-checking when ExpectedIDPEntityID is non-empty, causing a nil-pointer panic if a signed assertion omits the saml:Issuer element. Additionally, Subject.NameID uses a bare xml:"NameID" tag that matches NameID elements in any namespace, permitting encoding/xml to populate the field from foreign-namespace elements within saml:Subject, enabling an authenticated principal to spoof Subject.NameID.Value. Both issues affect all versions through v0.5.1 with no published fix available.

Affected products

  • crewjam saml all versions through v0.5.1

Timeline

  • 2026-11-05: disclosed: Public disclosure via Go vulnerability database

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.