CVE-2021-22573: Improper Verification of Cryptographic Signature in google-oauth-java-client

Summary

04/05/2022
HIGH
Yes i
High
7.3

GHSA-xh97-72ww-2w58: Duplicate Advisory: Improper Verification of Cryptographic Signature in google-oauth-java-client. Affects com.google.oauth-client:google-oauth-client versions >= 1.16.0-rc, < 1.33.3. Fixed in 1.33.3. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The google-oauth-java-client is an open-source library that provides support for OAuth 2.0 authentication in Java applications. It allows developers to integrate with Google APIs and services using OAuth 2.0 tokens. The library includes features for verifying the authenticity and integrity of ID tokens issued by Google. However, a vulnerability in the IdTokenVerifier class allows an attacker to bypass signature verification and modify the token's payload, potentially leading to unauthorized access or data manipulation.

Vulnerability Detail

The vulnerability arises from the lack of proper signature verification in the verify method of the IdTokenVerifier class. This means that the library does not validate the signature before verifying the claims in the token. An attacker can exploit this by providing a compromised token with a modified payload, such as email or phone number. The token will pass the validation by the library, allowing the attacker to use the modified payload in the application. While the risk is low if the verified IdToken is only used internally, if it is sent to other services without further signature verification, the risk increases. The vulnerability has a CVSS score of 7.3, indicating a high severity.

How To Fix

Minimum fixed version

1.33.3

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating the library is not feasible or if the library is indirectly used and cannot be updated, alternative IdToken verifiers provided by Google can be used. For example, the google-auth-library-java and google-api-java-client libraries offer similar IdToken verifiers that already include signature verification. Developers can consider using these alternative libraries to mitigate the vulnerability.

Conclusion

The vulnerability in the google-oauth-java-client library allows an attacker to bypass signature verification and modify the payload of ID tokens. This can lead to unauthorized access or data manipulation in the application. It is crucial to update the library to version 1.33.3 or higher to fix the vulnerability. Alternatively, using alternative IdToken verifiers provided by Google can also mitigate the issue. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for com.google.oauth-client:google-oauth-client →

Share this vulnerability

FAQ

The vulnerability allows an attacker to provide a compromised token with a modified payload, potentially leading to unauthorized access or data manipulation in the application.

Updating the google-oauth-java-client library to version 1.33.3 or higher fixes the vulnerability. Alternatively, using alternative IdToken verifiers provided by Google can also mitigate the issue.

If updating the library is not feasible, using alternative IdToken verifiers provided by Google can serve as a workaround.

There are no known public exploits of this vulnerability at the time of disclosure.

For more information, you can refer to the GitHub advisory for this vulnerability or contact the developers of the google-oauth-java-client library.

Related vulnerabilities

Recent vulnerabilities recorded for com.google.oauth-client:google-oauth-client.

How To Fix

Minimum fixed version

1.33.3

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback