CVE-2020-29509: Github.com/russellhaering/gosaml2 Authentication Bypass Vulnerability
CRITICALCVE-2020-29509 is a CRITICAL (CVSS 9.8) authentication bypass vulnerability (CWE-115: Misinterpretation of Input) affecting Github.com/russellhaering/gosaml2 libraries in the Go ecosystem. The issue involves authentication bypass in github.com/russellhaering/gosaml2. Remediation is available by upgrading affected packages to version 0.6.0.
CVE-2020-29509 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2020-29509
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.
Upgrade github.com/russellhaering/gosaml2 to 0.6.0
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 CVE-2020-29509, 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.6.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-115: Misinterpretation of Input, where the product misinterprets an input, whether from an attacker or another product, in a security-relevant fashion. 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
CVE-2020-29509 Affected Github.com/russellhaering/gosaml2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/russellhaering/gosaml2
|
Go |
< 0.6.0
|
0.6.0
|
References
Frequently Asked Questions
What is CVE-2020-29509?
Which Github.com/russellhaering/gosaml2 versions are affected?
What version fixes CVE-2020-29509?
Is github.com/russellhaering/gosaml2 affected?
What is the CVSS score of CVE-2020-29509?
What CWE is associated with CVE-2020-29509?
How can I check Go dependencies for CVE-2020-29509?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xhqq-x44f-9fgg",
"modified" : "2021-05-21T21:11:37Z",
"published" : "2022-02-11T23:58:09Z",
"aliases" : [ "CVE-2020-29509" ],
"summary" : "Authentication Bypass in github.com/russellhaering/gosaml2",
"details" : "### Impact\nGiven a valid SAML Response, it may be possible for an attacker to mutate the XML document in such a way that gosaml2 will trust a different portion of the document than was signed.\n\nDepending on the implementation of the Service Provider 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.\n\n### Patches\nService Providers utilizing gosaml2 should upgrade to v0.6.0 or greater.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/russellhaering/gosaml2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.6.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/russellhaering/gosaml2/security/advisories/GHSA-xhqq-x44f-9fgg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-29509"
}, {
"type" : "WEB",
"url" : "https://github.com/russellhaering/gosaml2/commit/42606dafba60c58c458f14f75c4c230459672ab9"
}, {
"type" : "WEB",
"url" : "https://github.com/mattermost/xml-roundtrip-validator/blob/master/advisories/unstable-attributes.md"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2021-0060"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20210129-0006"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-115" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-21T21:11:37Z",
"nvd_published_at" : "2020-12-14T20:15:00Z"
}
}