{"id":"GO-2026-4764","revision":null,"records":[{"revision":"1c61726019924825bf8521d7a946ead6","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-pcgw-qcv5-h8ch","aliases":["GO-2026-4764"],"title":"Unsigned SAML LogoutRequest Acceptance in gosaml2","description":"## Summary\n\nThe `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.\n\n## Affected Version\n\n- **Library**: `github.com/russellhaering/gosaml2`\n- **Version**: All versions up to and including the latest commit on `main` (as of 2026-03-16)\n- **File**: `decode_logout_request.go`, lines 58-69\n\n## Vulnerable Code\n\n```go\n// decode_logout_request.go:57-69\nvar requestSignatureValidated bool\nif !sp.SkipSignatureValidation {\n    el, err = sp.validateElementSignature(el)\n    if err == dsig.ErrMissingSignature {\n        // Unfortunately we just blew away our Response\n        el = doc.Root()                    // <-- BUG: falls through with unsigned element\n    } else if err != nil {\n        return nil, err\n    } else if el == nil {\n        return nil, fmt.Errorf(\"missing transformed logout request\")\n    } else {\n        requestSignatureValidated = true\n    }\n}\n```\n\nWhen `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.\n\n## Attack Details\n\n| Property | Value |\n|---|---|\n| **Attack vector** | Network (HTTP POST to SLO endpoint) |\n| **Authentication required** | None |\n| **Payload size** | ~450 bytes (unsigned XML) |\n| **User interaction** | None |\n| **Complexity** | Low -- only requires knowledge of the SP's SLO URL and IdP issuer |\n| **CVSS estimate** | 7.5 (High) -- Network/Low/None/None, Availability impact |\n\n## Impact\n\n- **Arbitrary session termination**: An attacker can force-logout any user by forging a `LogoutRequest` with the victim's `NameID`. This is a targeted denial-of-service.\n- **Business disruption**: Critical users (executives, admins, operators) can be repeatedly logged out, disrupting access to the application during incidents or time-sensitive operations.\n- **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.\n- **No cryptographic material needed**: The attacker does not need the IdP's private key. The forged request contains zero cryptographic elements.\n\n## Suggested Fix\n\nWhen `ErrMissingSignature` is returned and `SkipSignatureValidation` is `false`, the function should return an error instead of falling through:\n\n```go\n// decode_logout_request.go -- fixed version\nvar requestSignatureValidated bool\nif !sp.SkipSignatureValidation {\n    el, err = sp.validateElementSignature(el)\n    if err == dsig.ErrMissingSignature {\n        // FIXED: reject unsigned requests when signature validation is required\n        return nil, fmt.Errorf(\"logout request is not signed: %w\", dsig.ErrMissingSignature)\n    } else if err != nil {\n        return nil, err\n    } else if el == nil {\n        return nil, fmt.Errorf(\"missing transformed logout request\")\n    } else {\n        requestSignatureValidated = true\n    }\n}\n```\n\nThis ensures that unsigned `LogoutRequest` messages are rejected when `SkipSignatureValidation` is `false`, matching the behavior that operators expect when they configure signature enforcement.\n\nAttached lab \n[f1_unsigned_logout.zip](https://github.com/user-attachments/files/26038319/f1_unsigned_logout.zip)","state":0,"publishedAt":"2026-03-18T20:19:24+00:00","modifiedAt":"2026-09-10T03:50:40.2683905+00:00","affected":[{"ecosystem":"Go","name":"github.com/russellhaering/gosaml2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.11.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/russellhaering/gosaml2/security/advisories/GHSA-pcgw-qcv5-h8ch","https://github.com/russellhaering/gosaml2"],"sourceUrl":"https://github.com/advisories/GHSA-pcgw-qcv5-h8ch","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-pcgw-qcv5-h8ch","identifiers":["GHSA-pcgw-qcv5-h8ch","GO-2026-4764"]},"retained":false,"historicalAffected":[]},{"revision":"9e9c03a78f034df4b70331c32d8e3ae9","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-4764","aliases":["GHSA-pcgw-qcv5-h8ch"],"title":"Unsigned SAML LogoutRequest Acceptance in gosaml2 in github.com/russellhaering/gosaml2","description":"Unsigned SAML LogoutRequest Acceptance in gosaml2 in github.com/russellhaering/gosaml2","state":0,"publishedAt":"2026-03-27T18:39:44+00:00","modifiedAt":"2026-03-30T14:29:32.604668+00:00","affected":[{"ecosystem":"Go","name":"github.com/russellhaering/gosaml2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.11.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/russellhaering/gosaml2/security/advisories/GHSA-pcgw-qcv5-h8ch"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-4764","license":"OSV · upstream source license applies","key":"osv:GO-2026-4764","identifiers":["GO-2026-4764","GHSA-pcgw-qcv5-h8ch"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-16T03:30:47.3393218+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-16T03:30:47.3393218+00:00","lastSuccessAt":"2026-11-16T03:30:47.5025306+00:00","error":null,"lastVerifiedAt":"2026-11-16T03:30:47.5025309+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-6be044d0e08779dadd136f949a536de4047af96f5d7bceb7e190ecffbb8f18ca-8b6e139a850cc2a6b5126012e32ec45c19d4370854306148d5d13635a0c0a1af","complete":true,"records":425878,"lastAttemptAt":"2026-11-16T03:30:46.3350863+00:00","lastSuccessAt":"2026-11-16T03:30:46.3223223+00:00","error":null,"lastVerifiedAt":"2026-11-16T03:30:46.3350863+00:00","snapshotPublishedAt":"2026-11-16T03:21:35+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-7f4d8e8cc74e464e8c34a5ac0fac1a36","complete":false,"records":13821,"lastAttemptAt":"2026-11-16T03:41:34.8714449+00:00","lastSuccessAt":"2026-11-16T03:41:34.867+00:00","error":"130 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T03:41:34.867+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13744,"expectedIdentifiers":13874,"failedIdentifiers":130},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-16T03:30:47.3393218+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-16T03:30:47.3393218+00:00","lastSuccessAt":"2026-11-16T03:30:47.5032731+00:00","error":null,"lastVerifiedAt":"2026-11-16T03:30:47.5032733+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-cb821c14db734923a70a6d3bd1f879f3","complete":false,"records":13833,"lastAttemptAt":"2026-11-16T03:32:46.8084817+00:00","lastSuccessAt":"2026-11-16T03:32:46.807+00:00","error":"100 identifier lookups failed; latest failures include HttpIOException. Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T03:32:46.807+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13774,"expectedIdentifiers":13874,"failedIdentifiers":100},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-64eea06dbd27de8464d5dbce1b78cc794cc59e2d901516ae0d3ea76e624cdae0","complete":true,"records":9955,"lastAttemptAt":"2026-11-16T03:30:47.2794701+00:00","lastSuccessAt":"2026-11-14T13:57:23.1208135+00:00","error":null,"lastVerifiedAt":"2026-11-16T03:30:47.2794701+00:00","snapshotPublishedAt":"2026-11-14T13:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-16T03:30:46.7173041+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-16T03:30:46.7173041+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-16T03:30:47.2950864+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-16T03:30:47.2950864+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-e77c8ea93875d599a3ee92fde74c7150d1a28eacc697b92dc129baff6877c60e","complete":true,"records":232477,"lastAttemptAt":"2026-11-16T03:30:47.1761328+00:00","lastSuccessAt":"2026-11-16T01:07:48.2266333+00:00","error":null,"lastVerifiedAt":"2026-11-16T03:30:47.1761328+00:00","snapshotPublishedAt":"2026-11-16T01:03:09+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}