CVE-2021-3461 Keycloak insufficient session expiration

High 7.1 Published Updated

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.

PackageAffectedFixed in
org.keycloak:keycloak-parent MavenAll versions14.0.0
org.keycloak:keycloak-parent MavenAll versions14.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.

All Redhat Keycloak vulnerabilities

Sources

Also known as GHSA-cm29-6wx7-p874.

Is CVE-2021-3461 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free