CVE-2024-22258 CVE-2024-22258: PKCE Downgrade in Spring Authorization Server
Attackers can bypass PKCE protection for confidential clients using the Authorization Code Grant, potentially compromising authentication security.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2024-22258?
CVE-2024-22258 is a medium-severity vulnerability in Spring, published on 20 Mar 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Spring Authorization Server versions 1.0.0 - 1.0.5, 1.1.0 - 1.1.5, 1.2.0 - 1.2.2 and older unsupported versions are susceptible to a PKCE Downgrade Attack for Confidential Clients.
Specifically, an application is vulnerable when a Confidential Client uses PKCE for the Authorization Code Grant.
An application is not vulnerable when a Public Client uses PKCE for the Authorization Code Grant.
Weakness: CWE-470
Which versions are affected by CVE-2024-22258?
4 open source packages ship an affected version, including org.springframework.security:spring-security-oauth2-authorization-server.
| Package | Affected | Fixed in |
|---|---|---|
org.springframework.security:spring-security-oauth2-authorization-server Maven | All versions | 1.1.6 |
org.springframework.security:spring-security-oauth2-authorization-server Maven | All versions | 1.1.6 |
org.springframework.security:spring-security-oauth2-authorization-server Maven | From 1.2.0 | 1.2.3 |
org.springframework.security:spring-security-oauth2-authorization-server Maven | From 1.2.0 | 1.2.3 |
How do I fix CVE-2024-22258?
Upgrade org.springframework.security:spring-security-oauth2-authorization-server to a fixed version for your release line: 1.1.6 or 1.2.3.
Is CVE-2024-22258 being exploited?
There is no known exploitation of CVE-2024-22258 in the wild and no public exploit code.
Sources
Also known as CLSA-2026-1768522124, GHSA-x637-x8p3-5p22, ROOT-APP-MAVEN-CVE-2024-22258, UBUNTU-CVE-2024-22258.