# CVE-2020-7692: Improper Authorization

> An attacker can intercept authorization codes due to missing PKCE support, allowing them to gain unauthorized access to protected resources.

- **Severity:** High 7.4 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Jul 2020
- **Updated:** 17 Sep 2024
- **Also known as:** CLSA-2026-1774225188, DEBIAN-CVE-2020-7692, GHSA-f263-c949-w85g, SNYK-JAVA-COMGOOGLEOAUTHCLIENT-575276, UBUNTU-CVE-2020-7692

## What is CVE-2020-7692?

CVE-2020-7692 is a high-severity missing authorization vulnerability in com.google.oauth-client:google-oauth-client, published on 9 Jul 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

PKCE support is not implemented in accordance with the RFC for OAuth 2.0 for Native Apps. Without the use of PKCE, the authorization code returned by an authorization server is not enough to guarantee that the client that issued the initial authorization request is the one that will be authorized. An attacker is able to obtain the authorization code using a malicious app on the client-side and use it to gain authorization to the protected resource. This affects the package com.google.oauth-client:google-oauth-client before 1.31.0.

Weakness: CWE-863 (Incorrect Authorization)

## Which versions are affected by CVE-2020-7692?

2 open source packages ship an affected version, including com.google.oauth-client:google-oauth-client. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.google.oauth-client:google-oauth-client` | Maven | All versions | 1.31.0 |
| `com.google.oauth-client:google-oauth-client` | Maven | All versions | 1.31.0 |

Products: Google Oauth Client Library for Java.

## How do I fix CVE-2020-7692?

Upgrade com.google.oauth-client:google-oauth-client to 1.31.0 or later.

## Is CVE-2020-7692 being exploited?

There is no known exploitation of CVE-2020-7692 in the wild and no public exploit code.

## Other vulnerabilities in com.google.oauth-client:google-oauth-client

- [CVE-2021-22573](https://insights.sbomify.com/CVE-2021-22573/): Incorrect signature verification on Google-oauth-java-client (high 8.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-7692 and fix it if it is affected.

What it is: CVE-2020-7692 is a high-severity missing authorization vulnerability in com.google.oauth-client:google-oauth-client, published on 9 Jul 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-7692 in the wild and no public exploit code.

Affected packages and fixed versions:
- com.google.oauth-client:google-oauth-client (Maven): affected all versions; fixed in 1.31.0
- com.google.oauth-client:google-oauth-client (Maven): affected all versions; fixed in 1.31.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-7692/ (Markdown: https://insights.sbomify.com/CVE-2020-7692/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-7692
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-7692
- OSV: https://osv.dev/vulnerability/CVE-2020-7692

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-7692/
Summaries are generated and may contain mistakes; the official description above is the record.
