CVE-2020-14359: Github.com/keycloak/keycloak gatekeeper Keycloak Gatekeeper Vulnerable To Bypass Vulnerability

HIGH
Advisory Identifier: GHSA-jh6m-3pqw-242h
CVSS 7.3
CWE-305
Published
Advisory Summary

CVE-2020-14359 is a HIGH (CVSS 7.3) keycloak gatekeeper vulnerable to bypass vulnerability (CWE-305: Authentication Bypass by Primary Weakness) affecting Github.com/keycloak/keycloak gatekeeper libraries in the Go ecosystem. The issue involves keycloak gatekeeper vulnerable to bypass on using lower case http headers. Remediation is available in the latest vendor maintenance releases.

CVE-2020-14359 at a Glance

CVE Identifier CVE-2020-14359
GHSA Identifier GHSA-jh6m-3pqw-242h
Severity HIGH
CVSS v3.1 Base Score 7.3
CWE Classification CWE-305: Authentication Bypass by Primary Weakness
Affected Product Github.com/keycloak/keycloak gatekeeper
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.3

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:L/I:L/A:L).

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

How to Fix CVE-2020-14359

To remediate this vulnerability, upgrade all affected Github.com/keycloak/keycloak gatekeeper 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/keycloak/keycloak-gatekeeper fixed: Latest secure release
Upgrade github.com/keycloak/keycloak-gatekeeper to Latest secure release
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/keycloak/keycloak-gatekeeper

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-14359, inspect your project dependencies for Github.com/keycloak/keycloak gatekeeper:

inspect dependencies for github.com/keycloak/keycloak-gatekeeper

Analyze the terminal output to locate any version of Github.com/keycloak/keycloak gatekeeper in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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-305: Authentication Bypass by Primary Weakness, where the authentication algorithm is sound, but the implemented mechanism can be bypassed as the result of a separate weakness that is primary to the authentication error. In Github.com/keycloak/keycloak gatekeeper, 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

A vulnerability was found in all versions of the deprecated package Keycloak Gatekeeper, where on using lower case HTTP headers (via cURL) we can bypass our Gatekeeper. Lower case headers are also accepted by some webservers (e.g. Jetty). This means there is no protection when we put a Gatekeeper in front of a Jetty server and use lowercase headers.

CVE-2020-14359 Affected Github.com/keycloak/keycloak gatekeeper Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
github.com/keycloak/keycloak-gatekeeper
Go
≤ 1.2.8

References

Frequently Asked Questions

What is CVE-2020-14359?
CVE-2020-14359 is a security vulnerability in Github.com/keycloak/keycloak gatekeeper involving Keycloak Gatekeeper vulnerable to bypass on using lower case HTTP headers under CWE-305: Authentication Bypass by Primary Weakness.
Which Github.com/keycloak/keycloak gatekeeper versions are affected?
Affected versions include releases prior to current release patches across affected packages: github.com/keycloak/keycloak-gatekeeper.
What version fixes CVE-2020-14359?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/keycloak/keycloak-gatekeeper affected?
Yes, github.com/keycloak/keycloak-gatekeeper is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2020-14359?
CVE-2020-14359 has a CVSS v3.1 base score of 7.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2020-14359?
CVE-2020-14359 is classified under CWE-305: Authentication Bypass by Primary Weakness (The authentication algorithm is sound, but the implemented mechanism can be bypassed as the result of a separate weakness that is primary to the authentication error.).
How can I check Go dependencies for CVE-2020-14359?
Run the dependency tree command: 'inspect dependencies for github.com/keycloak/keycloak-gatekeeper'. 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-jh6m-3pqw-242h",
  "modified" : "2022-08-12T20:52:13Z",
  "published" : "2022-02-09T00:56:04Z",
  "aliases" : [ "CVE-2020-14359" ],
  "summary" : "Keycloak Gatekeeper vulnerable to bypass on using lower case HTTP headers",
  "details" : "A vulnerability was found in all versions of the deprecated package Keycloak Gatekeeper, where on using lower case HTTP headers (via cURL) we can bypass our Gatekeeper. Lower case headers are also accepted by some webservers (e.g. Jetty). This means there is no protection when we put a Gatekeeper in front of a Jetty server and use lowercase headers.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/keycloak/keycloak-gatekeeper"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.2.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-14359"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/keycloak/keycloak/issues/12934"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1868591"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/keycloak/keycloak-gatekeeper"
  }, {
    "type" : "WEB",
    "url" : "https://issues.jboss.org/browse/KEYCLOAK-14090"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20190613000352/github.com/keycloak/keycloak-gatekeeper"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-305" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-04-01T16:13:00Z",
    "nvd_published_at" : "2021-02-23T13:15:00Z"
  }
}