Man-in-the-Middle (MitM) Affecting github.com/dexidp/dex/server package, versions <2.35.0


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
1.2% (66th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMDEXIDPDEXSERVER-3039652
  • published4 Oct 2022
  • disclosed3 Oct 2022
  • creditJoernchen, Bobcallaway, Haydentherapper

Introduced: 3 Oct 2022

CVE-2022-39222  (opens in a new tab)
CWE-300  (opens in a new tab)

How to fix?

Upgrade github.com/dexidp/dex/server to version 2.35.0 or higher.

Overview

Affected versions of this package are vulnerable to Man-in-the-Middle (MitM) by allowing an attacker to capture the ID token via intercepted authorization code. 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.

** Note: **

PKCE does not defend against this attack since the webserver initiates the request to Dex with a known code challenge.

Workaround

Users who are unable to upgrade to the fixed version can disable public clients.

CVSS Base Scores

version 3.1