CVE-2022-31690 Overview
CVE-2022-31690 is a privilege escalation vulnerability affecting Spring Security, a widely-used security framework for Java applications. This vulnerability allows a malicious user or attacker to modify a request initiated by the Client (via the browser) to the Authorization Server, which can lead to a privilege escalation on the subsequent approval. The attack scenario specifically occurs when the Authorization Server responds with an OAuth2 Access Token Response containing an empty scope list (per RFC 6749, Section 5.1) on the subsequent request to the token endpoint to obtain the access token.
Critical Impact
Attackers can escalate privileges through manipulated OAuth2 authorization flows, potentially gaining unauthorized access to protected resources and elevated permissions within affected applications.
Affected Products
- VMware Spring Security versions 5.7 prior to 5.7.5
- VMware Spring Security versions 5.6 prior to 5.6.9
- NetApp Active IQ Unified Manager (VMware vSphere and Windows)
Discovery Timeline
- 2022-10-31 - CVE-2022-31690 published to NVD
- 2025-05-08 - Last updated in NVD database
Technical Details for CVE-2022-31690
Vulnerability Analysis
This privilege escalation vulnerability exists within the OAuth2 authorization flow handling in Spring Security. The vulnerability exploits a specific edge case in the OAuth2 protocol implementation where the Authorization Server returns an empty scope list in the Access Token Response. According to RFC 6749, Section 5.1, the scope parameter in the token response is optional, and when omitted or empty, the authorization server may grant a different set of scopes than originally requested.
The attack requires network access and involves manipulating the authorization request flow between the client browser and the Authorization Server. While the attack complexity is high due to the specific conditions required, successful exploitation requires no privileges or user interaction, making it a concerning threat for applications relying on Spring Security's OAuth2 implementation.
Root Cause
The root cause of this vulnerability lies in how Spring Security handles OAuth2 Access Token Responses that contain an empty scope list. When the Authorization Server responds without explicit scope restrictions, the framework fails to properly validate and enforce the originally requested scopes, allowing attackers to potentially obtain elevated privileges beyond what was initially authorized.
Attack Vector
The attack vector for CVE-2022-31690 involves network-based manipulation of the OAuth2 authorization flow. An attacker can intercept and modify the authorization request sent from the client browser to the Authorization Server. When the Authorization Server processes this modified request and returns an Access Token Response with an empty scope list, the subsequent token obtained may grant broader privileges than intended.
The attack flow involves:
- Client initiates OAuth2 authorization request through the browser
- Attacker intercepts and modifies the request to the Authorization Server
- Authorization Server responds with an Access Token Response containing an empty scope list
- Spring Security fails to properly validate scope restrictions
- Attacker obtains access token with escalated privileges
Detection Methods for CVE-2022-31690
Indicators of Compromise
- Unusual OAuth2 token requests with manipulated scope parameters
- Access Token Responses containing empty or modified scope lists
- Unexpected privilege escalation events in application audit logs
- Anomalous user permission changes following OAuth2 authentication flows
Detection Strategies
- Monitor OAuth2 authorization endpoints for requests with suspicious scope modifications
- Implement logging and alerting for Access Token Responses with empty scope lists
- Review application logs for privilege escalation events correlated with OAuth2 authentication
- Deploy network monitoring to detect manipulation of OAuth2 flows between clients and authorization servers
Monitoring Recommendations
- Enable detailed logging for all OAuth2 authorization and token exchange operations
- Configure alerts for any privilege changes following OAuth2 authentication events
- Implement anomaly detection for scope parameter variations in authorization requests
- Monitor for unauthorized access to protected resources following token issuance
How to Mitigate CVE-2022-31690
Immediate Actions Required
- Upgrade Spring Security to version 5.7.5 or later for the 5.7.x branch
- Upgrade Spring Security to version 5.6.9 or later for the 5.6.x branch
- Review and audit current OAuth2 configurations for proper scope enforcement
- Implement additional scope validation at the application level as a defense-in-depth measure
Patch Information
VMware has released patches addressing this vulnerability. Organizations should upgrade to Spring Security 5.7.5 or 5.6.9 depending on their current version branch. For detailed patch information and release notes, refer to the VMware CVE-2022-31690 Advisory. NetApp customers should consult the NetApp Security Advisory NTAP-20221215-0010 for guidance on Active IQ Unified Manager.
Workarounds
- Implement strict scope validation at the application layer independent of Spring Security's handling
- Configure Authorization Servers to always explicitly return scope lists in token responses
- Deploy web application firewalls (WAF) to monitor and filter suspicious OAuth2 requests
- Implement additional authorization checks beyond OAuth2 scopes for sensitive operations
# Example: Update Spring Security dependency in Maven pom.xml
# For 5.7.x branch:
# <spring-security.version>5.7.5</spring-security.version>
#
# For 5.6.x branch:
# <spring-security.version>5.6.9</spring-security.version>
#
# Verify current version:
mvn dependency:tree | grep spring-security
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


