{"id":"GHSA-vh7g-p26c-j2cw","revision":null,"records":[{"revision":"76853164566b4676b127adcaff1a5920","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2022-39222","aliases":[],"title":"OAuth authorization code exposure in Dex","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.","state":0,"publishedAt":"2022-10-06T00:00:00+00:00","modifiedAt":"2025-04-22T17:20:02.654+00:00","affected":[{"ecosystem":"Vendor product","name":"dex","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"dexidp\",\n                    \"product\": \"dex\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 2.35.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N","score":9.3,"severity":"CRITICAL"}],"references":["https://github.com/dexidp/dex/security/advisories/GHSA-vh7g-p26c-j2cw","https://github.com/dexidp/dex/commit/49471b14c8080ddb034d4855841123d378b7a634"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2022-39222","license":"CVE Program Terms of Use","key":"cve-program:CVE-2022-39222","identifiers":["CVE-2022-39222"]},"retained":false,"historicalAffected":[]},{"revision":"c3449483a798432d95d92a1172251f1d","observedAt":"2026-11-18T03:31:39.426+00:00","statement":{"source":"euvd","id":"EUVD-2022-7166","aliases":["CVE-2022-39222","GHSA-vh7g-p26c-j2cw"],"title":"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 t…","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N","score":9.3,"severity":null}],"references":["https://github.com/dexidp/dex/security/advisories/GHSA-vh7g-p26c-j2cw","https://github.com/dexidp/dex/commit/49471b14c8080ddb034d4855841123d378b7a634"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2022-7166","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Oct 6, 2022, 12:00:00 AM","dateUpdated":"Apr 22, 2025, 5:20:02 PM"},"relatedAdvisories":[{"id":"WID-SEC-W-2023-3113","title":"Red Hat Advanced Cluster Security: Schwachstelle ermöglicht Offenlegung von Informationen","vulnerabilityIds":["CVE-2022-39222"]},{"id":"RHSA-2023:7725","title":"Red Hat Security Advisory: RHACS 4.3 enhancement and security update","vulnerabilityIds":["CVE-2022-39222"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2022-7166","identifiers":["EUVD-2022-7166","CVE-2022-39222","GHSA-vh7g-p26c-j2cw"]},"retained":false,"historicalAffected":[]},{"revision":"34fa351dab744d738aa5b1f4de8e5533","observedAt":"2026-10-24T20:17:36.139+00:00","statement":{"source":"nvd","id":"CVE-2022-39222","aliases":[],"title":"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 t…","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.","state":0,"publishedAt":"2022-10-06T18:16:09.037+00:00","modifiedAt":"2026-06-17T04:57:56.79+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N","score":9.3,"severity":"CRITICAL"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"severity":"MEDIUM"}],"references":["https://github.com/dexidp/dex/commit/49471b14c8080ddb034d4855841123d378b7a634","https://github.com/dexidp/dex/security/advisories/GHSA-vh7g-p26c-j2cw"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2022-39222","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-200","CWE-862"],"productCriteria":["cpe:2.3:a:linuxfoundation:dex:*:*:*:*:*:*:*:*"],"sourceDates":{"published":"2022-10-06T18:16:09.037","lastModified":"2026-06-17T04:57:56.790"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2022-39222","identifiers":["CVE-2022-39222"]},"retained":false,"historicalAffected":[]},{"revision":"b5bd2e5358e641ab8ef2af23c93e83eb","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-vh7g-p26c-j2cw","aliases":["CVE-2022-39222"],"title":"Dex vulnerable to Man-in-the-Middle allowing ID token capture via intercepted authorization code","description":"### Impact\nDex instances with public clients (and by extension, clients accepting tokens issued by those Dex instances) are affected by this vulnerability.\n\nAn 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.\n\n### Steps to reproduce\n\n1) A victim navigates to a malicious website\n\n2) The webserver initiates a connection with a Dex instance directly - https://dexexample.com/auth/https:%252F%252Faccounts.google.com?access_type=online&client_id=example&nonce=2AaJAimQU9CbeOFsNra1d7CJTWB&redirect_uri=http%3A%2F%2Flocalhost%3A40393%2Fauth%2Fcallback&response_type=code&scope=openid+email&state=2AaJAjhpUmsB25csCo5muvorMTl. In this example, the Dex instance is hosted on `dexexample.com`, and the connector is `accounts.google.com`.\n\n3) Dex returns a 302 Redirect to the connector IDP, https://accounts.google.com/o/oauth2/v2/auth?client_id=237800849078-hri2ndt7gdafpf34kq8crd5sik9pe3so.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fdexexample.com%2Fauth%2Fcallback&response_type=code&scope=openid+email&state=g3dkmpontsr3ugocoddjx72ef. The attacker records the state parameter value g3dkmpontsr3ugocoddjx72ef which will be used as the request ID later on.\n\n4) The malicious website redirects the victim’s browser to the connector IDP.\n\n5) The user authenticates to the connector IDP. If they have authenticated before, they may not be presented with an authentication challenge. The user will silently be taken through the following steps:\n\n    Authentication with the connector IDP, which redirects the browser to the Dex callback with a code - https://dexexample.com/callback?state=g3dkmpontsr3ugocoddjx72ef&code=4%2F0AX4XfWizg1PQEQNl18hmP0_YQ3iUYII2ed13n9ikKr_ZcV7uCZpZaPcIlxBzX5QwFIcs-w&scope=email+openid+https%3A%2F%[2Fwww.googleapis.com](http://2fwww.googleapis.com/)%2Fauth%2Fuserinfo.email&authuser=0&hd=[google.com](http://google.com/)&prompt=none\n\n    Dex handles the callback, fetching the user claims from the connector IDP, persisting them and generating an OAuth code. Then Dex redirects the browser to the approval endpoint https://dexexample.com/approval?req=g3dkmpontsr3ugocoddjx72ef. Note that the req parameter is the same as the attacker's recorded state parameter.\n\n    Dex uses the request ID to look up the OAuth code, and builds a redirect to the original callback with the code - http://localhost:40393/auth/callback?code=bz5p3oov2wlh5k3rboa4atxas&state=2AaJAjhpUmsB25csCo5muvorMTl.\n\n\nIn step 2., when the webserver initiates the connection to Dex and receives the redirect to the connector IDP, the webserver will persist the connector state parameter (`g3dkmpontsr3ugocoddjx72ef`), which is used as the request ID to later look up the OAuth code. As the user goes through the authentication flow with the connector IDP, the webserver will repeatedly request `/approval?req=<state>`. Once the user has successfully authenticated, if the webserver is able to call /approval before the victim’s browser calls `/approval`, then an attacker can fetch the Dex OAuth code which can be exchanged for an ID token using the `/token` endpoint.\n\nNote that PKCE does not defend against this attack since the webserver initiates the request to Dex with a known code challenge.\n\n### Fix\n\nThe request has been made unpredictable with message authentication. This was accomplished by creating an [HMAC](https://en.wikipedia.org/wiki/HMAC) using a randomly generated per-request secret. This secret is persisted between the initial login request and the approval request. Since the HMAC is derived using a secret key, its value cannot be known to an attacker, so they will be unable to poll `/approval` for the code.\n\n### Patches\nUpdate to 2.35.0.\n\n### Workarounds\nNo known workarounds (without impacting behavior) for existing versions.\n\nDisabling public clients is the only way to defend against attacks exploiting this vulnerability.\n\n### References\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Start a new [discussion](https://github.com/dexidp/dex/discussions/new?category=q-a)\n* Email us at [cncf-dex-maintainers@lists.cncf.io](mailto:cncf-dex-maintainers@lists.cncf.io)\n","state":0,"publishedAt":"2022-10-03T19:12:03+00:00","modifiedAt":"2026-09-10T03:49:46.691834+00:00","affected":[{"ecosystem":"Go","name":"github.com/dexidp/dex","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.35.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["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","https://github.com/dexidp/dex","https://github.com/dexidp/dex/releases/tag/v2.35.0"],"sourceUrl":"https://github.com/advisories/GHSA-vh7g-p26c-j2cw","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-vh7g-p26c-j2cw","identifiers":["GHSA-vh7g-p26c-j2cw","CVE-2022-39222"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-19T04:24:37.1903365+00:00","complete":true,"records":1786,"lastAttemptAt":"2026-11-19T04:24:37.1903365+00:00","lastSuccessAt":"2026-11-19T04:24:37.372166+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:37.3721666+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-e55c589538e0700b45c7d6d41fe1447a79199283262c371c864535c791a040b9-0e69c6613585444f641c92f526100c36dd9cd3e99fef2d7247efc88cf506728d","complete":true,"records":428229,"lastAttemptAt":"2026-11-19T04:22:50.7413942+00:00","lastSuccessAt":"2026-11-19T04:22:50.7221018+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:22:50.7413942+00:00","snapshotPublishedAt":"2026-11-19T03:23:50+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-eed1ef18663c45929f7d7e7a714a8e59","complete":false,"records":13861,"lastAttemptAt":"2026-11-19T04:31:06.4268449+00:00","lastSuccessAt":"2026-11-19T04:31:06.423+00:00","error":"148 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-19T04:31:06.423+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13703,"expectedIdentifiers":13908,"failedIdentifiers":148},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-19T04:24:37.1903365+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-19T04:24:37.1903365+00:00","lastSuccessAt":"2026-11-19T04:24:38.0697004+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:38.0697013+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-84b4b212d7ef41cb9ec24b71e9d8e5d8","complete":true,"records":13873,"lastAttemptAt":"2026-11-19T04:24:39.3964736+00:00","lastSuccessAt":"2026-11-19T04:24:39.391+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:39.391+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13908,"expectedIdentifiers":13908,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-76574c95b6792d47ba90af64983ed5843633f14426346d676016e94a5f383202","complete":true,"records":9963,"lastAttemptAt":"2026-11-19T04:24:37.034158+00:00","lastSuccessAt":"2026-11-19T01:24:31.4213722+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:37.034158+00:00","snapshotPublishedAt":"2026-11-19T01:03:15+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-19T04:22:50.8981544+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:22:50.8981544+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-c0d9c71c6fa06d617f979e7bec0d97aca70ca5aea1558184002f8e44516f2fac","complete":true,"records":3177,"lastAttemptAt":"2026-11-19T04:24:37.1431899+00:00","lastSuccessAt":"2026-11-18T21:25:09.5127964+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:37.1431899+00:00","snapshotPublishedAt":"2026-11-18T21:18:06+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-2556fa291ec863b7fd77332e55dcff5569878e06b48ea32c182e52878cdd1ce8","complete":true,"records":232702,"lastAttemptAt":"2026-11-19T04:24:36.8996689+00:00","lastSuccessAt":"2026-11-19T04:24:35.8955272+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:36.8996689+00:00","snapshotPublishedAt":"2026-11-19T03:33:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}