CVE-2021-3461 Keycloak insufficient session expiration
Keycloak fails to terminate user sessions when logging out via external SAML IdP with specific principal settings, allowing persistent access.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-3461?
CVE-2021-3461 is a high-severity authentication bypass vulnerability in Redhat Keycloak, published on 1 Apr 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
A flaw was found in keycloak where keycloak may fail to logout user session if the logout request comes from external SAML identity provider and Principal Type is set to Attribute [Name].
Weakness: CWE-613
Which versions are affected by CVE-2021-3461?
2 open source packages ship an affected version, including org.keycloak:keycloak-parent. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
org.keycloak:keycloak-parent Maven | All versions | 14.0.0 |
org.keycloak:keycloak-parent Maven | All versions | 14.0.0 |
Products include Redhat Keycloak, Redhat Single Sign-On.
How do I fix CVE-2021-3461?
Upgrade org.keycloak:keycloak-parent to 14.0.0 or later.
Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.
Is CVE-2021-3461 being exploited?
There is no known exploitation of CVE-2021-3461 in the wild and no public exploit code.
Other vulnerabilities in Redhat Keycloak
- CVE-2022-4361 Keycloak vulnerable to cross-site scripting when validating URI-schemes on SAML and OIDC
- CVE-2022-1245 Keycloak vulnerable to privilege escalation on Token Exchange feature
- CVE-2021-20195 keycloak Self Stored Cross-site Scripting vulnerability
- CVE-2019-14910 Keycloak Authentication Error
- CVE-2019-14909 Keycloak Authentication Error
Sources
Also known as GHSA-cm29-6wx7-p874.