CVE-2026-128073

gosaml2: Unauthenticated panic decrypting an EncryptedAssertion with a short or empty CipherValue

Published Nov 17, 2026 CVSS 3.1 · 7.5 High EPSS n/a KEV · Not listed
Description
gosaml2 is a Pure Go implementation of SAML 2.0. Prior to 0.12.0, ValidateEncodedResponse() calls decryptAssertions() on an EncryptedAssertion before signature or content validation completes, and EncryptedAssertion.DecryptBytes() in types/encrypted_assertion.go slices decoded ciphertext without first validating the required nonce or initialization-vector length. A CipherValue shorter than the 12-byte AES-GCM nonce causes a slice-bounds panic, and an empty AES-CBC CipherValue passes the modulo block-size check before causing a slice-bounds panic at the 16-byte initialization-vector split. An attacker needs only the service provider's public certificate to wrap a symmetric key, and no valid identity-provider signature or relationship is required. The unrecovered panic can terminate the request goroutine or the service process. This issue is fixed in version 0.12.0.

Analysis

AI-generated

Technical impact

gosaml2, a Pure Go SAML 2.0 library, contains a flaw that allows an unauthenticated attacker to provoke a panic by sending a crafted EncryptedAssertion. The library performs decryption of the assertion before validating its signature, and the decryption routine slices the ciphertext without checking the nonce or initialization‑vector length. A CipherValue shorter than the required 12‑byte AES‑GCM nonce, or an empty AES‑CBC CipherValue, triggers a slice‑bounds panic. The panic may terminate the request goroutine or the entire service process, resulting in a denial of service. The weakness is reflected in CWE‑20 (Input Validation) and CWE‑248 (Unexpected ≤).

Affected Systems

The vulnerability affects any deployment that incorporates gosaml2 versions earlier than 0.12.0. This includes codebases that rely on the library for processing SAML assertions in their identity‑provider or service‑provider roles.*

Risk and Exploitability

The CVSS score of 7.5 categorizes this issue as high severity. While the EPSS score is not available, there is no indication that this flaw has been exploited in the wild, and it is not listed in the CISA KEV catalog. The attack can be carried out over the network without needing legitimate identity‑provider signatures; the attacker merely needs the service provider's public certificate to wrap a symmetric key. Consequently, the likely attack vector is a crafted SAML response sent to a service that uses gosaml2 to validate assertions. The attacker can repeatedly trigger the panic to disrupt availability.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the gosaml2 library to version 0.12.0 or later, which implements proper bounds checks on the cipher value before decryption.
  • If an upgrade is not immediately possible, add explicit validation of the CipherValue length (12 bytes for AES‑GCM or 16 bytes for AES‑CBC) before attempting decryption, and ensure that signature verification precedes any decryption logic.
  • Configure the application to recover from any panic in the gosaml2 code path, so that a single malformed assertion does not terminate the entire service process.

Generated by OpenCVE AI on November 17, 2026 at 20:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description gosaml2 is a Pure Go implementation of SAML 2.0. Prior to 0.12.0, ValidateEncodedResponse() calls decryptAssertions() on an EncryptedAssertion before signature or content validation completes, and EncryptedAssertion.DecryptBytes() in types/encrypted_assertion.go slices decoded ciphertext without first validating the required nonce or initialization-vector length. A CipherValue shorter than the 12-byte AES-GCM nonce causes a slice-bounds panic, and an empty AES-CBC CipherValue passes the modulo block-size check before causing a slice-bounds panic at the 16-byte initialization-vector split. An attacker needs only the service provider's public certificate to wrap a symmetric key, and no valid identity-provider signature or relationship is required. The unrecovered panic can terminate the request goroutine or the service process. This issue is fixed in version 0.12.0.
Title gosaml2: Unauthenticated panic decrypting an EncryptedAssertion with a short or empty CipherValue
Weaknesses CWE-20
CWE-248
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Subscriptions

No data.

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 17, 2026, 7:39 PM
Reserved
Nov 12, 2026, 9:24 PM
Status
Received
Published
Nov 17, 2026, 8:17 PM
Modified
Nov 17, 2026, 8:17 PM