An attacker who can supply a crafted SAML Response for parsing can crash a gosaml2 service provider by sending an EncryptedAssertion with AES-GCM encryption metadata and a CipherValue shorter than the GCM nonce size (12 bytes). The library panics with slice bounds out of range before any validation completes.
This is a distinct issue from GHSA-hwqm-qvj9-4jr2, which addressed panics in the AES-CBC decryption path (commit 3418f9ae09063ff8df0ce1bd93f24e538e614def, included in v0.10.0). That fix added a block-size check for CBC but left the AES-GCM path completely unprotected.
ValidateEncodedResponse() decrypts EncryptedAssertion nodes before signature or content validation completes. There are two call sites:
decode_response.go#L341decode_response.go#L388Both call decryptAssertions() (decode_response.go#L150-L200), which calls EncryptedAssertion.DecryptBytes() at decode_response.go#L176.
Inside DecryptBytes() (types/encrypted_assertion.go#L34-L92), the AES-GCM branch ([line 53, `case MethodAES128GCM, MethodAES192GCM,...
0.12.0Exploitability
AV:NAC:LPR:NUI:NScope
S:UImpact
C:NI:NA:H7.5/CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HInput Validation
Other