Skip to content
Heist/ feed
Back to feed
Critical

OAuth authorization code exposure in Dex

Type: advisorySources: OSV

Dex is an identity service that uses OpenID Connect to drive authentication for other apps. Dex instances with public clients (and by extension, clients accepting tokens issued by those Dex instances) are affected by this vulnerability if they are running a version prior to 2.35.0. An attacker can exploit this vulnerability by making a victim navigate to a malicious website and guiding them through the OIDC flow, stealing the OAuth authorization code in the process. The authorization code then can be exchanged by the attacker for a token, gaining access to applications accepting that token. Version 2.35.0 has introduced a fix for this issue. Users are advised to upgrade. There are no known workarounds for this issue.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-39222
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 19:14 UTC · Revision 1

Source evidence

OAuth authorization code exposure in Dex

core-osv · Original source

Published 6 Oct 2022, 00:00 UTC

Dex is an identity service that uses OpenID Connect to drive authentication for other apps. Dex instances with public clients (and by extension, clients accepting tokens issued by those Dex instances) are affected by this vulnerability if they are running a version prior to 2.35.0. An attacker can exploit this vulnerability by making a victim navigate to a malicious website and guiding them through the OIDC flow, stealing the OAuth authorization code in the process. The authorization code then can be exchanged by the attacker for a token, gaining access to applications accepting that token. Version 2.35.0 has introduced a fix for this issue. Users are advised to upgrade. There are no known workarounds for this issue.

osv:CVE-2022-39222
Complete source record
{
  "id": "422546d2ed8001c95eab9a0b54be79f979bf076a3a264d02e61f6cee65edd01d",
  "url": "https://osv.dev/vulnerability/CVE-2022-39222",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "OAuth authorization code exposure in Dex",
    "summary": "Dex is an identity service that uses OpenID Connect to drive authentication for other apps. Dex instances with public clients (and by extension, clients accepting tokens issued by those Dex instances) are affected by this vulnerability if they are running a version prior to 2.35.0. An attacker can exploit this vulnerability by making a victim navigate to a malicious website and guiding them through the OIDC flow, stealing the OAuth authorization code in the process. The authorization code then can be exchanged by the attacker for a token, gaining access to applications accepting that token. Version 2.35.0 has introduced a fix for this issue. Users are advised to upgrade. There are no known workarounds for this issue.",
    "evidence": "osv:CVE-2022-39222",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2022-39222",
      "aliases": [
        "CVE-2022-39222",
        "GHSA-vh7g-p26c-j2cw"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/dexidp/dex",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "e4bceef9f3d1ff97a12fbbdb464047c5f1fac8b5"
                },
                {
                  "fixed": "49471b14c8080ddb034d4855841123d378b7a634"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:linuxfoundation:dex:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.35.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "49471b14c8080ddb034d4855841123d378b7a634"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.32.0",
            "v2.34.0",
            "v2.33.0",
            "v2.31.0",
            "api/v2.1.0",
            "v2.30.0",
            "v2.29.0",
            "v2.28.1",
            "v2.28.0",
            "v2.27.0",
            "v2.26.0",
            "v2.25.0",
            "api/v2.0.0",
            "v2.24.0",
            "v2.23.0",
            "v2.22.0",
            "v2.21.0",
            "v2.20.0",
            "v2.19.0",
            "v2.18.0",
            "v2.17.0",
            "v2.16.0",
            "v2.15.0",
            "v2.14.0",
            "v2.13.0",
            "v2.12.0",
            "v2.11.0",
            "v2.10.0",
            "v2.9.0",
            "v2.8.0",
            "v2.7.1",
            "v2.7.0",
            "v2.6.0",
            "v2.5.0",
            "v2.4.0",
            "v2.3.0",
            "v2.2.0",
            "v2.2.3",
            "v2.1.0",
            "v2.0.1",
            "v2.0.0",
            "v2.0.0-beta.3",
            "v2.0.0-beta.1",
            "v2.0.0-beta.2",
            "v2.0.0-alpha.5",
            "v2.0.0-alpha.4",
            "v2.0.0-alpha.3",
            "v2.0.0-alpha.2",
            "v2.0.0-alpha.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-39222.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:38.772213854Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/39xxx/CVE-2022-39222.json",
        "https://github.com/dexidp/dex/security/advisories/GHSA-vh7g-p26c-j2cw",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-39222",
        "https://github.com/dexidp/dex/commit/49471b14c8080ddb034d4855841123d378b7a634"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-200"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/39xxx/CVE-2022-39222.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-39222",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 506053,
  "published_at": "2022-10-06T00:00:00+00:00"
}