GHSA-5684-g483-2249: Github.com/russellhaering/gosaml2 Signature Validation Bypass Vulnerability

CRITICAL
CWE-347
Published
Advisory Summary

GHSA-5684-g483-2249 is a CRITICAL signature validation bypass vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Github.com/russellhaering/gosaml2 libraries in the Go ecosystem. The issue involves signature validation bypass. Remediation is available by upgrading affected packages to version 0.5.0.

GHSA-5684-g483-2249 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-5684-g483-2249
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Github.com/russellhaering/gosaml2
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-5684-g483-2249

To remediate this vulnerability, upgrade all affected Github.com/russellhaering/gosaml2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/russellhaering/gosaml2 fixed: 0.5.0
Upgrade github.com/russellhaering/gosaml2 to 0.5.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/russellhaering/gosaml2

How to Check if You Are Affected

To determine whether your application is affected by GHSA-5684-g483-2249, inspect your project dependencies for Github.com/russellhaering/gosaml2:

inspect dependencies for github.com/russellhaering/gosaml2

Analyze the terminal output to locate any version of Github.com/russellhaering/gosaml2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Github.com/russellhaering/gosaml2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Given a valid SAML Response, an attacker can potentially modify the document, bypassing signature validation in order to pass off the altered document as a signed one. This enables a variety of attacks, including users accessing accounts other than the one to which they authenticated in the identity provider, or full authentication bypass if an external attacker can obtain an expired, signed SAML Response. ### Patches A patch is available, users of gosaml2 should upgrade to v0.5.0 or higher. ### References See the [underlying advisory on goxmldsig](https://github.com/russellhaering/goxmldsig/security/advisories/GHSA-q547-gmf8-8jr7) for more details.

GHSA-5684-g483-2249 Affected Github.com/russellhaering/gosaml2 Versions

1 component(s)
Fixed Versions:
0.5.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/russellhaering/gosaml2
Go
< 0.5.0
0.5.0

References

Frequently Asked Questions

What is GHSA-5684-g483-2249?
GHSA-5684-g483-2249 is a security vulnerability in Github.com/russellhaering/gosaml2 involving Signature Validation Bypass under CWE-347: Improper Verification of Cryptographic Signature.
Which Github.com/russellhaering/gosaml2 versions are affected?
Affected versions include releases prior to 0.5.0 across affected packages: github.com/russellhaering/gosaml2.
What version fixes GHSA-5684-g483-2249?
Upgrading to 0.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/russellhaering/gosaml2 affected?
Yes, github.com/russellhaering/gosaml2 is affected in releases prior to 0.5.0. Upgrade your dependency to 0.5.0 or later.
What CWE is associated with GHSA-5684-g483-2249?
GHSA-5684-g483-2249 is classified under CWE-347: Improper Verification of Cryptographic Signature (The product does not verify, or incorrectly verifies, the cryptographic signature for data.).
How can I check Go dependencies for GHSA-5684-g483-2249?
Run the dependency tree command: 'inspect dependencies for github.com/russellhaering/gosaml2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5684-g483-2249",
  "modified" : "2021-10-05T17:07:09Z",
  "published" : "2021-05-24T16:59:47Z",
  "aliases" : [ ],
  "summary" : "Signature Validation Bypass",
  "details" : "### Impact\nGiven a valid SAML Response, an attacker can potentially modify the document, bypassing signature validation in order to pass off the altered document as a signed one.\n\nThis enables a variety of attacks, including users accessing accounts other than the one to which they authenticated in the identity provider, or full authentication bypass if an external attacker can obtain an expired, signed SAML Response.\n\n### Patches\nA patch is available, users of gosaml2 should upgrade to v0.5.0 or higher.\n\n### References\nSee the [underlying advisory on goxmldsig](https://github.com/russellhaering/goxmldsig/security/advisories/GHSA-q547-gmf8-8jr7) for more details.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/russellhaering/gosaml2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/russellhaering/gosaml2/security/advisories/GHSA-5684-g483-2249"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/russellhaering/gosaml2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-21T22:17:56Z",
    "nvd_published_at" : null
  }
}