CVE-2020-15234: Github.com/ory/fosite Redirect URL Matching Ignores Character Vulnerability

MODERATE
Advisory Identifier: GHSA-grfp-q2mm-hfp6
CVSS 6.1
CWE-20 CWE-601 CWE-178
Published
Advisory Summary

CVE-2020-15234 is a MODERATE (CVSS 6.1) redirect url matching ignores character vulnerability (CWE-20: Improper Input Validation) affecting Github.com/ory/fosite libraries in the Go ecosystem. The issue involves redirect url matching ignores character casing. Remediation is available by upgrading affected packages to version 0.34.1.

CVE-2020-15234 at a Glance

CVE Identifier CVE-2020-15234
GHSA Identifier GHSA-grfp-q2mm-hfp6
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-20: Improper Input Validation
Affected Product Github.com/ory/fosite
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2020-15234

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.

github.com/ory/fosite fixed: 0.34.1
Upgrade github.com/ory/fosite to 0.34.1
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/ory/fosite

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-15234, 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

### Impact Before version v0.34.1, the OAuth 2.0 Client's registered redirect URLs and the redirect URL provided at the OAuth2 Authorization Endpoint where compared using `strings.ToLower` while they should have been compared with a simple string match: 1. Registering a client with allowed redirect URL `https://example.com/callback` 2. Performing OAuth2 flow and requesting redirect URL `https://example.com/CALLBACK` 3. Instead of an error (invalid redirect URL), the browser is redirected to `https://example.com/CALLBACK` with a potentially successful OAuth2 response, depending on the state of the overall OAuth2 flow (the user might still deny the request for example).

CVE-2020-15234 Affected Github.com/ory/fosite Versions

1 component(s)
Fixed Versions:
0.34.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/ory/fosite
Go
< 0.34.1
0.34.1

References

Frequently Asked Questions

What is CVE-2020-15234?
CVE-2020-15234 is a security vulnerability in Github.com/ory/fosite involving Redirect URL matching ignores character casing under CWE-20: Improper Input Validation.
Which Github.com/ory/fosite versions are affected?
Affected versions include releases prior to 0.34.1 across affected packages: github.com/ory/fosite.
What version fixes CVE-2020-15234?
Upgrading to 0.34.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/ory/fosite affected?
Yes, github.com/ory/fosite is affected in releases prior to 0.34.1. Upgrade your dependency to 0.34.1 or later.
What is the CVSS score of CVE-2020-15234?
CVE-2020-15234 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2020-15234?
CVE-2020-15234 is classified under CWE-20: Improper Input Validation (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.).
How can I check Go dependencies for CVE-2020-15234?
Run the dependency tree command: 'inspect dependencies for github.com/ory/fosite'. 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-grfp-q2mm-hfp6",
  "modified" : "2021-11-19T14:43:47Z",
  "published" : "2021-05-24T17:00:05Z",
  "aliases" : [ "CVE-2020-15234" ],
  "summary" : "Redirect URL matching ignores character casing",
  "details" : "### Impact\n\nBefore version v0.34.1, the OAuth 2.0 Client's registered redirect URLs and the redirect URL provided at the OAuth2 Authorization Endpoint where compared using `strings.ToLower` while they should have been compared with a simple string match:\n\n1. Registering a client with allowed redirect URL `https://example.com/callback`\n2. Performing OAuth2 flow and requesting redirect URL `https://example.com/CALLBACK`\n3. Instead of an error (invalid redirect URL), the browser is redirected to `https://example.com/CALLBACK` with a potentially successful OAuth2 response, depending on the state of the overall OAuth2 flow (the user might still deny the request for example).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/ory/fosite"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.34.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ory/fosite/security/advisories/GHSA-grfp-q2mm-hfp6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15234"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ory/fosite/commit/cdee51ebe721bfc8acca0fd0b86b030ca70867bf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ory/fosite"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-178", "CWE-20", "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-21T22:15:37Z",
    "nvd_published_at" : "2020-10-02T21:15:00Z"
  }
}