{"answers":{"affected":"3 open source packages ship an affected version, including github.com/russellhaering/gosaml2.","exploited":"There is no known exploitation of GHSA-pcgw-qcv5-h8ch in the wild and no public exploit code.","fix":"Upgrade github.com/russellhaering/gosaml2 to 0.11.0 or later.","what":"GHSA-pcgw-qcv5-h8ch is a vulnerability in github.com/russellhaering/gosaml2, published on 18 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-pcgw-qcv5-h8ch and fix it if it is affected.\n\nWhat it is: GHSA-pcgw-qcv5-h8ch is a vulnerability in github.com/russellhaering/gosaml2, published on 18 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-pcgw-qcv5-h8ch in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/russellhaering/gosaml2 (Go): affected all versions; fixed in 0.11.0\n- github.com/russellhaering/gosaml2 (Go): affected all versions; fixed in 0.11.0\n- github.com/russellhaering/gosaml2 (Go): affected all versions; fixed in 0.11.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-pcgw-qcv5-h8ch/ (Markdown: https://insights.sbomify.com/GHSA-pcgw-qcv5-h8ch/index.md)","id":"GHSA-pcgw-qcv5-h8ch","markdown":"https://insights.sbomify.com/GHSA-pcgw-qcv5-h8ch/index.md","name":"GHSA-pcgw-qcv5-h8ch","record":{"aliases":["GO-2026-4764"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["denial_of_service","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Go SAML library","requires_auth":"none","summary":"Attackers can forge unsigned SAML LogoutRequests to terminate user sessions in applications using the gosaml2 library, bypassing signature validation.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"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()                    // \u003c-- 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)","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Unsigned SAML LogoutRequest Acceptance in gosaml2","id":"GHSA-pcgw-qcv5-h8ch","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"security_feature_bypass","year":"2026"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["0.11.0"],"introduced":["0"],"last_affected":[],"package":"github.com/russellhaering/gosaml2","purl":null,"source":"GHSA-pcgw-qcv5-h8ch"},{"ecosystem":"Go","fixed":["0.11.0"],"introduced":["0"],"last_affected":[],"package":"github.com/russellhaering/gosaml2","purl":"pkg:golang/github.com/russellhaering/gosaml2","source":"GHSA-pcgw-qcv5-h8ch"},{"ecosystem":"Go","fixed":["0.11.0"],"introduced":["0"],"last_affected":[],"package":"github.com/russellhaering/gosaml2","purl":"pkg:golang/github.com/russellhaering/gosaml2","source":"GO-2026-4764"}],"products":null,"published":"2026-03-18","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can forge unsigned SAML LogoutRequests to terminate user sessions in applications using the gosaml2 library, bypassing signature validation.","url":"https://insights.sbomify.com/GHSA-pcgw-qcv5-h8ch/"}