CVE-2022-31690
spring-security-oauth2-client vulnerable to Privilege Escalation
Reported by vmware · Published October 31, 2022
Spring Security, versions 5.7 prior to 5.7.5, and 5.6 prior to 5.6.9, and older unsupported versions could be susceptible to a privilege escalation under certain conditions. A malicious user or attacker can 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. This scenario can happen if 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.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | Spring Security | Spring Security (5.7 to 5.7.4 and 5.6 to 5.6.8 as well as older, unsupported versions) |
| n/a | Spring Security | Spring Security (5.7 to 5.7.4 and 5.6 to 5.6.8 as well as older, unsupported versions) |
| Maven | org.springframework.security:spring-security-core | |
| Maven | org.springframework.security:spring-security-oauth2-client | 0, 5.7.0 |
Timeline
- Oct 31, 2022 CVE Published
- Nov 1, 2022 EPSS Score (30 in total, the first dated here)
- May 8, 2025 CVE Updated
- Mar 17, 2026 Security Advisory
- Jun 24, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-31690
vulnetix vdb fixes CVE-2022-31690
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-31690/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://nvd.nist.gov/vuln/detail/CVE-2022-31690 advisory
- https://github.com/spring-projects/spring-security-samples/blob/4638e1e428ee2ddab234199eb3b67b9c94dfa08b/servlet/spring-boot/java/oauth2/webclient/src/main/java/example/SecurityConfiguration.java#L48 url
- https://github.com/advisories/GHSA-32vj-v39g-jh23 advisory