Summary
The ValidateEncodedLogoutRequestPOST function in gosaml2 accepts completely unsigned SAML LogoutRequest messages even when SkipSignatureValidation is set to false. When validateElementSignature returns dsig.ErrMissingSignature, the code in decode_logout_request.go:60-62 silently falls through to process the unverified XML element instead of rejecting it. An attacker who can reach the SP's Single Logout endpoint can forge a LogoutRequest for any user, terminating their session without possessing the IdP's signing key.
Affected Version
- Library:
github.com/russellhaering/gosaml2 - Version: All versions up to and including the latest commit on
main(as of 2026-03-16) - File:
decode_logout_request.go, lines 58-69
Vulnerable Code
// decode_logout_request.go:57-69
var requestSignatureValidated bool
if !sp.SkipSignatureValidation {
el, err = sp.validateElementSignature(el)
if err == dsig.ErrMissingSignature {
// Unfortunately we just blew away our Response
el = doc.Root() // <-- BUG: falls through with unsigned element
} else if err != nil {
return nil, err
} else if el == nil {
return nil, fmt.Errorf("missing transformed logout request")
} else {
requestSignatureValidated = true
}
}
When ErrMissingSignature is returned, the code resets el to the raw document root and continues. The requestSignatureValidated variable remains false, but no error is returned. The unsigned LogoutRequest is unmarshalled and passed to ValidateDecodedLogoutRequest, which performs attribute/issuer checks but does not verify that a signature was present.
Attack Details
| Property | Value |
|---|---|
| Attack vector | Network (HTTP POST to SLO endpoint) |
| Authentication required | None |
| Payload size | ~450 bytes (unsigned XML) |
| User interaction | None |
| Complexity | Low -- only requires knowledge of the SP's SLO URL and IdP issuer |
| CVSS estimate | 7.5 (High) -- Network/Low/None/None, Availability impact |
Impact
- Arbitrary session termination: An attacker can force-logout any user by forging a
LogoutRequestwith the victim'sNameID. This is a targeted denial-of-service. - Business disruption: Critical users (executives, admins, operators) can be repeatedly logged out, disrupting access to the application during incidents or time-sensitive operations.
- Security control bypass: If session termination triggers downstream effects (e.g., revoking tokens, clearing caches), an attacker can weaponize this to force re-authentication flows and potentially intercept them.
- No cryptographic material needed: The attacker does not need the IdP's private key. The forged request contains zero cryptographic elements.
GHSA-PCGW-QCV5-H8CH has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.11.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
When ErrMissingSignature is returned and SkipSignatureValidation is false, the function should return an error instead of falling through:
// decode_logout_request.go -- fixed version
var requestSignatureValidated bool
if !sp.SkipSignatureValidation {
el, err = sp.validateElementSignature(el)
if err == dsig.ErrMissingSignature {
// FIXED: reject unsigned requests when signature validation is required
return nil, fmt.Errorf("logout request is not signed: %w", dsig.ErrMissingSignature)
} else if err != nil {
return nil, err
} else if el == nil {
return nil, fmt.Errorf("missing transformed logout request")
} else {
requestSignatureValidated = true
}
}
This ensures that unsigned LogoutRequest messages are rejected when SkipSignatureValidation is false, matching the behavior that operators expect when they configure signature enforcement.
Attached lab
f1_unsigned_logout.zip
Frequently Asked Questions
- What is GHSA-PCGW-QCV5-H8CH? GHSA-PCGW-QCV5-H8CH is a high-severity security vulnerability in github.com/russellhaering/gosaml2 (go), affecting versions <= 0.10.0. It is fixed in 0.11.0.
- How severe is GHSA-PCGW-QCV5-H8CH? GHSA-PCGW-QCV5-H8CH has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/russellhaering/gosaml2 are affected by GHSA-PCGW-QCV5-H8CH? github.com/russellhaering/gosaml2 (go) versions <= 0.10.0 is affected.
- Is there a fix for GHSA-PCGW-QCV5-H8CH? Yes. GHSA-PCGW-QCV5-H8CH is fixed in 0.11.0. Upgrade to this version or later.
- Is GHSA-PCGW-QCV5-H8CH exploitable, and should I be worried? Whether GHSA-PCGW-QCV5-H8CH is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-PCGW-QCV5-H8CH is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-PCGW-QCV5-H8CH? Upgrade
github.com/russellhaering/gosaml2to 0.11.0 or later.