Panic and NameID spoofing during SAML assertion processing (GO-2026-6909)

Panic and NameID spoofing during SAML assertion processing (GO-2026-6909)

Description

In versions of github.com/crewjam/saml before v0.5.2, a signed assertion missing Subject, Conditions, or SubjectConfirmationData may cause a panic after signature verification. The library can also read a NameID from another XML namespace as the identifier of the SAML subject.

Potential impact

Request processing may stop, or an authenticated principal may spoof the NameID value used by the application. Trusting XML elements solely because their names match can lead to incorrect user identification.

Remediation

Update github.com/crewjam/saml to v0.5.2 or later. Use only the NameID in the SAML namespace from a validated assertion to identify the user.

References