Skip to main content

CVE-2021-22573: CWE-347 Improper Verification of Cryptographic Signature in Google LLC Google-oauth-java-client

Medium
Published: Tue May 03 2022 (05/03/2022, 15:45:12 UTC)
Source: CVE
Vendor/Project: Google LLC
Product: Google-oauth-java-client

Description

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

AI-Powered Analysis

AILast updated: 06/20/2025, 13:48:59 UTC

Technical Analysis

CVE-2021-22573 is a vulnerability identified in the Google-oauth-java-client library, specifically related to the IDToken verifier component. The core issue is an improper verification of cryptographic signatures (CWE-347), where the IDToken verifier fails to confirm whether the token's signature is valid and properly signed by a trusted provider. In OAuth 2.0 and OpenID Connect flows, ID tokens are used to assert the identity of a user and are cryptographically signed by the identity provider to ensure authenticity and integrity. The failure to verify the signature means that an attacker can craft a malicious token with a custom payload and have it accepted as valid by client applications using vulnerable versions of this library. This undermines the trust model of authentication and authorization, potentially allowing attackers to impersonate users, escalate privileges, or bypass access controls. The vulnerability affects unspecified versions of the Google-oauth-java-client prior to version 1.33.3, which includes the fix. Although no known exploits in the wild have been reported, the vulnerability represents a significant risk due to the fundamental role of token signature verification in secure authentication. The flaw is particularly critical in environments where OAuth tokens are used to protect sensitive resources or perform critical operations. The vulnerability was published on May 3, 2022, and is categorized as medium severity by the source, but given the nature of the flaw, it warrants careful consideration. The vulnerability does not require user interaction or authentication to exploit, as it targets the client-side token validation process. The scope includes any application or service using the affected Google-oauth-java-client library versions for OAuth token validation, which could be widespread given the popularity of Google's OAuth libraries in Java-based applications.

Potential Impact

For European organizations, the impact of this vulnerability can be significant, especially for those relying on Google OAuth for authentication in web applications, internal tools, or cloud services. Exploitation could lead to unauthorized access to sensitive data, impersonation of legitimate users, and potential privilege escalation within enterprise environments. This could result in data breaches, regulatory non-compliance (e.g., GDPR violations), and reputational damage. Sectors such as finance, healthcare, government, and critical infrastructure, which often use OAuth for identity management, are particularly at risk. The vulnerability undermines the integrity and confidentiality of authentication tokens, potentially allowing attackers to bypass security controls without detection. Given that many European organizations integrate Google services and open-source libraries into their authentication flows, the risk is amplified. Additionally, the lack of known exploits does not diminish the threat, as the vulnerability could be leveraged in targeted attacks or supply chain compromises. The availability impact is indirect but could arise if attackers use compromised tokens to disrupt services or escalate attacks.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should immediately audit their use of the Google-oauth-java-client library and identify all applications and services that perform OAuth token validation using this library. The primary and most effective mitigation is to upgrade to version 1.33.3 or later, where the signature verification flaw is corrected. Organizations should also implement additional token validation layers, such as verifying token issuer, audience, expiration, and nonce values, to reduce risk. Employing runtime application self-protection (RASP) or Web Application Firewalls (WAFs) with custom rules to detect anomalous token payloads can provide temporary defense. Security teams should conduct penetration testing and code reviews focused on OAuth flows to detect improper validation logic. Monitoring authentication logs for unusual token usage patterns or anomalies can help detect exploitation attempts. For critical systems, consider implementing multi-factor authentication (MFA) and limiting token lifetimes to reduce the window of opportunity for attackers. Finally, organizations should maintain an inventory of third-party libraries and dependencies to ensure timely patching of vulnerabilities.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Google
Date Reserved
2021-01-05T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d984bc4522896dcbf7f2a

Added to database: 5/21/2025, 9:09:31 AM

Last enriched: 6/20/2025, 1:48:59 PM

Last updated: 8/7/2025, 5:53:18 PM

Views: 14

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats