---
id: "GO-2026-6909"
page: "https://infrastack.ai/live/GO-2026-6909"
kind: "vulnerability"
aliases: ["GO-2026-6909"]
title: "Nil-pointer panic in validateAssertion and namespace-blind Subject.NameID in github.com/crewjam/saml"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "github.com/crewjam/saml", "fixed": [], "affected": "all versions", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["crewjam-saml", "go", "package", "saml", "sso"]
not_affected_if: ["no-saml-usage", "not-service-provider"]
published_at: "2026-11-05T22:55:15+00:00"
first_seen_at: "2026-11-06T00:09:14+00:00"
updated_at: "2026-11-06T00:10:30+00:00"
sources: [{"source": "govuln", "url": "https://pkg.go.dev/vuln/GO-2026-6909", "first_seen_at": "2026-11-06T00:09:14+00:00"}]
exploit_sources: []
---

# Nil-pointer panic in validateAssertion and namespace-blind Subject.NameID in github.com/crewjam/saml

Link for people: https://infrastack.ai/live/GO-2026-6909 (this .md is for agents)

github.com/crewjam/saml through v0.5.1 crashes when a signed SAML assertion omits the Issuer element and an expected IdP entity ID is set. It also lets a signed assertion with a foreign-namespace NameID element spoof the subject name ID, so an authenticated user could impersonate another identity.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:github.com/crewjam/saml affected all versions fixed no fixed version listed

## How to check

- Check whether the project depends on `github.com/crewjam/saml` with `go list -m github.com/crewjam/saml`
- Confirm the resolved version is `v0.5.1` or earlier

## Timeline

- 2026-11-06T00:09:14+00:00 govuln https://pkg.go.dev/vuln/GO-2026-6909

## From the sources

github.com/crewjam/saml through v0.5.1 contains two vulnerabilities in SAML assertion processing:

1. ServiceProvider.validateAssertion dereferences assertion.Issuer without a nil check when ExpectedIDPEntityID is non-empty. A signed SAML assertion that omits the optional <saml:Issuer> element causes a nil-pointer dereference panic after signature verification.

2. 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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
