Описание
google-oauth-java-client improperly verifies cryptographic signature
Summary
The vulnerability impacts only users of the IdTokenVerifier class. The verify method in IdTokenVerifier does not validate the signature before verifying the claims (e.g., iss, aud, etc.). Signature verification makes sure that the token's payload comes from valid provider, not from someone else.
An attacker can provide a compromised token with modified payload like email or phone number. The token will pass the validation by the library. Once verified, modified payload can be used by the application.
If the application sends verified IdToken to other service as is like for auth - the risk is low, because the backend of the service is expected to check the signature and fail the request.
Reporter: Tamjid al Rahat, contributor
Patches
The issue was fixed in the 1.33.3 version of the library
Proof of Concept
To reproduce, one needs to call the verify function with an IdToken instance that contains a malformed signature to successfully bypass the checks inside the verify function.
Remediation and Mitigation
Update to the version 1.33.3 or higher
If the library used indirectly or cannot be updated for any reason you can use similar IdToken verifiers provided by Google that already has signature verification. For example: google-auth-library-java google-api-java-client
Timeline
Date reported: 12 Dec 2021 Date fixed: 13 Apr 2022 Date disclosed: 2 May 2022
For more information
If you have any questions or comments about this advisory:
- Open an issue in the google-oauth-java-client repo
Ссылки
- https://github.com/googleapis/google-oauth-java-client/security/advisories/GHSA-hw42-3568-wj87
- https://nvd.nist.gov/vuln/detail/CVE-2021-22573
- https://github.com/googleapis/google-oauth-java-client/pull/872
- https://github.com/googleapis/google-oauth-java-client/commit/c634ad4e31cac322bb1aa8a9feb0569749011bf0
Пакеты
com.google.oauth-client:google-oauth-client
>= 1.16.0-rc, < 1.33.3
1.33.3
Связанные уязвимости
The vulnerability is that IDToken verifier does not verify if token is properly signed. Signature verification makes sure that the token's payload comes from valid provider, not from someone else. An attacker can provide a compromised token with custom payload. The token will pass the validation on the client side. We recommend upgrading to version 1.33.3 or above
The vulnerability is that IDToken verifier does not verify if token is properly signed. Signature verification makes sure that the token's payload comes from valid provider, not from someone else. An attacker can provide a compromised token with custom payload. The token will pass the validation on the client side. We recommend upgrading to version 1.33.3 or above
The vulnerability is that IDToken verifier does not verify if token is properly signed. Signature verification makes sure that the token's payload comes from valid provider, not from someone else. An attacker can provide a compromised token with custom payload. The token will pass the validation on the client side. We recommend upgrading to version 1.33.3 or above
The vulnerability is that IDToken verifier does not verify if token is ...