CVE-2020-27847: Github.com/dexidp/dex Authentication Bypass Vulnerability

CRITICAL
Advisory Identifier: GHSA-2x32-jm95-2cpx
CVSS 9.8
CWE-228 CWE-290
Published
Advisory Summary

CVE-2020-27847 is a CRITICAL (CVSS 9.8) authentication bypass vulnerability (CWE-228: Improper Handling of Syntactically Invalid Structure) affecting Github.com/dexidp/dex libraries in the Go ecosystem. The issue involves authentication bypass in dex. Remediation is available by upgrading affected packages to version 2.27.0.

CVE-2020-27847 at a Glance

CVE Identifier CVE-2020-27847
GHSA Identifier GHSA-2x32-jm95-2cpx
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-228: Improper Handling of Syntactically Invalid Structure
Affected Product Github.com/dexidp/dex
Package Ecosystem Go
Published Date
Last Updated

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).

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 High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2020-27847

To remediate this vulnerability, upgrade all affected Github.com/dexidp/dex 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/dexidp/dex fixed: 2.27.0
Upgrade github.com/dexidp/dex to 2.27.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/dexidp/dex

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-27847, inspect your project dependencies for Github.com/dexidp/dex:

inspect dependencies for github.com/dexidp/dex

Analyze the terminal output to locate any version of Github.com/dexidp/dex in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.27.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-228: Improper Handling of Syntactically Invalid Structure, where the product does not handle or incorrectly handles input that is not syntactically well-formed with respect to the associated specification. In Github.com/dexidp/dex, 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 exists in the SAML connector of the github.com/dexidp/dex library used to process SAML Signature Validation. This flaw allows an attacker to bypass SAML authentication. The highest threat from this vulnerability is to confidentiality, integrity, as well as system availability. This flaw affects dex versions before 2.27.0.

CVE-2020-27847 Affected Github.com/dexidp/dex Versions

1 component(s)
Fixed Versions:
2.27.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/dexidp/dex
Go
< 2.27.0
2.27.0

References

Frequently Asked Questions

What is CVE-2020-27847?
CVE-2020-27847 is a security vulnerability in Github.com/dexidp/dex involving Authentication Bypass in dex under CWE-228: Improper Handling of Syntactically Invalid Structure.
Which Github.com/dexidp/dex versions are affected?
Affected versions include releases prior to 2.27.0 across affected packages: github.com/dexidp/dex.
What version fixes CVE-2020-27847?
Upgrading to 2.27.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/dexidp/dex affected?
Yes, github.com/dexidp/dex is affected in releases prior to 2.27.0. Upgrade your dependency to 2.27.0 or later.
What is the CVSS score of CVE-2020-27847?
CVE-2020-27847 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2020-27847?
CVE-2020-27847 is classified under CWE-228: Improper Handling of Syntactically Invalid Structure (The product does not handle or incorrectly handles input that is not syntactically well-formed with respect to the associated specification.).
How can I check Go dependencies for CVE-2020-27847?
Run the dependency tree command: 'inspect dependencies for github.com/dexidp/dex'. 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-2x32-jm95-2cpx",
  "modified" : "2021-06-01T17:58:22Z",
  "published" : "2021-12-20T17:52:12Z",
  "aliases" : [ "CVE-2020-27847" ],
  "summary" : "Authentication Bypass in dex",
  "details" : "A vulnerability exists in the SAML connector of the github.com/dexidp/dex library used to process SAML Signature Validation. This flaw allows an attacker to bypass SAML authentication. The highest threat from this vulnerability is to confidentiality, integrity, as well as system availability. This flaw affects dex versions before 2.27.0.",
  "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/dexidp/dex"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.27.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/dexidp/dex/security/advisories/GHSA-m9hp-7r99-94h5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-27847"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1907732"
  }, {
    "type" : "WEB",
    "url" : "https://mattermost.com/blog/coordinated-disclosure-go-xml-vulnerabilities"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-228", "CWE-290" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-06-01T17:58:22Z",
    "nvd_published_at" : "2021-05-28T11:15:00Z"
  }
}