CVE-2022-39222
MEDIUM 6.5CVSS 3.1Dex vulnerable to Man-in-the-Middle allowing ID token capture via intercepted authorization code
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.
- Published
- 6 Oct 2022
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-200CWE-862
- Also known as
- GHSA-vh7g-p26c-j2cw
- Sources
- NVDJSONOSV GHSA-vh7g-p26c-j2cwJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | CRITICAL 9.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | linuxfoundation | dexcpe:2.3:a:linuxfoundation:dex:*:*:*:*:*:*:*:* |
< 2.35.0 | 2.35.0 |
| OSV | Go | github.com/dexidp/dex | < 2.35.0 | 2.35.0 |
References
- https://github.com/dexidp/dex/commit/49471b14c8080ddb034d4855841123d378b7a634 · Patch, Third Party Advisory, WEB
- https://github.com/dexidp/dex/security/advisories/GHSA-vh7g-p26c-j2cw · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-39222 · ADVISORY
- https://github.com/dexidp/dex · PACKAGE
- https://github.com/dexidp/dex/releases/tag/v2.35.0 · WEB
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 6 Oct 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 3 Oct 2022)