CVE-2020-15233: Github.com/ory/fosite OAuth2 Redirect URL Validity Does Vulnerability
MODERATECVE-2020-15233 is a MODERATE (CVSS 6.1) oauth2 redirect url validity does vulnerability (CWE-20: Improper Input Validation) affecting Github.com/ory/fosite libraries in the Go ecosystem. The issue involves oauth2 redirect url validity does not respect query parameters and character casing for loopback addresses. Remediation is available by upgrading affected packages to version 0.34.1.
CVE-2020-15233 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N/E:P/RL:O/RC:C).
How to Fix CVE-2020-15233
To remediate this vulnerability, upgrade all affected Github.com/ory/fosite 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/ory/fosite to 0.34.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/ory/fosite
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-15233, inspect your project dependencies for Github.com/ory/fosite:
inspect dependencies for github.com/ory/fosite
Analyze the terminal output to locate any version of Github.com/ory/fosite in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.34.1), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Github.com/ory/fosite, 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-15233 Affected Github.com/ory/fosite Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/ory/fosite
|
Go |
≥ 0.30.3
< 0.34.1
|
0.34.1
|
References
Frequently Asked Questions
What is CVE-2020-15233?
Which Github.com/ory/fosite versions are affected?
What version fixes CVE-2020-15233?
Is github.com/ory/fosite affected?
What is the CVSS score of CVE-2020-15233?
What CWE is associated with CVE-2020-15233?
How can I check Go dependencies for CVE-2020-15233?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rfq3-w54c-f9q5",
"modified" : "2021-11-19T14:42:56Z",
"published" : "2021-05-24T17:00:12Z",
"aliases" : [ "CVE-2020-15233" ],
"summary" : "OAuth2 Redirect URL validity does not respect query parameters and character casing for loopback addresses",
"details" : "### Impact\n\n[fosite#400](https://github.com/ory/fosite/pull/400) (released as v0.30.2) introduced a new feature for handling redirect URLs pointing to loopback interfaces ([rfc8252#section-7.3](https://tools.ietf.org/html/rfc8252#section-7.3)). As part of that change new behavior was introduced which failed to respect the redirect URL's (only for loopback interfaces!) query parameters\n\n1. Registering a client with allowed redirect URL `http://127.0.0.1/callback`\n2. Performing OAuth2 flow and requesting redirect URL `http://127.0.0.1/callback?bar=foo`\n3. Instead of an error, the browser is redirected to `http://127.0.0.1/callback?bar=foo` with a potentially successful OAuth2 response.\n\nas well as the host parameter (as long as the host is a loopback interface):\n\n1. Registering a client with allowed redirect URL `https://example.com/callback`\n2. Performing OAuth2 flow and requesting redirect URL `http://127.0.0.1/callback`\n3. Instead of an error, the browser is redirected to `http://127.0.0.1/callback` with a potentially successful OAuth2 response.\n\nThese bugs are only applicable in scenarios where the attacker has control over the loopback interface (`localhost`, `127.0.0.1`, `[::1]`) where the browser performing the OAuth2 flow is running.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N/E:P/RL:O/RC:C"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/ory/fosite"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.30.3"
}, {
"fixed" : "0.34.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ory/fosite/security/advisories/GHSA-rfq3-w54c-f9q5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15233"
}, {
"type" : "WEB",
"url" : "https://github.com/ory/fosite/pull/400"
}, {
"type" : "WEB",
"url" : "https://github.com/ory/fosite/commit/cdee51ebe721bfc8acca0fd0b86b030ca70867bf"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ory/fosite"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-21T22:14:38Z",
"nvd_published_at" : "2020-10-02T21:15:00Z"
}
}