CVE-2022-39222 OAuth authorization code exposure in Dex

Critical 9.3 Published Updated

Attackers can steal OAuth authorization codes from public clients via malicious websites, allowing them to gain unauthorized access to applications.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-39222?

CVE-2022-39222 is a critical vulnerability in dexidp dex, published on 6 Oct 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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

Weakness: CWE-862, CWE-200

Which versions are affected by CVE-2022-39222?

2 open source packages ship an affected version, including github.com/dexidp/dex. It affects 1 product.

PackageAffectedFixed in
github.com/dexidp/dex GoAll versions2.35.0
github.com/dexidp/dex GoAll versions2.35.0

Products include Linuxfoundation Dex.

How do I fix CVE-2022-39222?

Upgrade github.com/dexidp/dex to 2.35.0 or later.

Is CVE-2022-39222 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-39222 exists.

Sources

Also known as GHSA-vh7g-p26c-j2cw.

Is CVE-2022-39222 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free