CVE-2021-4133 Improper Authorization in Keycloak

High 8.8 Published Updated

An attacker with any user account can create new default users via the admin API even when registration is disabled, bypassing access controls.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-4133?

CVE-2021-4133 is a high-severity missing authorization vulnerability in Redhat Keycloak, published on 25 Jan 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

A flaw was found in Keycloak in versions from 12.0.0 and before 15.1.1 which allows an attacker with any existing user account to create new default user accounts via the administrative REST API even when new user registration is disabled.

Weakness: CWE-863

Which versions are affected by CVE-2021-4133?

2 open source packages ship an affected version, including org.keycloak:keycloak-services. It affects 1 product.

PackageAffectedFixed in
org.keycloak:keycloak-services MavenAll versions15.1.1
org.keycloak:keycloak-services MavenAll versions15.1.1
Linux distribution packages (4)
rh-sso7-keycloak Red Hat:red_hat_single_sign_on:7.5::el7All versions0:15.0.2-3.redhat_00002.1.el7sso
rh-sso7-keycloak-server Red Hat:red_hat_single_sign_on:7.5::el7All versions0:15.0.2-3.redhat_00002.1.el7sso
rh-sso7-keycloak Red Hat:red_hat_single_sign_on:7.5::el8All versions0:15.0.2-3.redhat_00002.1.el8sso
rh-sso7-keycloak-server Red Hat:red_hat_single_sign_on:7.5::el8All versions0:15.0.2-3.redhat_00002.1.el8sso

Products include Redhat Keycloak.

How do I fix CVE-2021-4133?

Upgrade org.keycloak:keycloak-services to 15.1.1 or later.

Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.

Is CVE-2021-4133 being exploited?

There is no known exploitation of CVE-2021-4133 in the wild and no public exploit code.

All Redhat Keycloak vulnerabilities

Sources

Also known as GHSA-83x4-9cwr-5487, RHSA-2021:5218, RHSA-2021:5219.

Is CVE-2021-4133 in your software?

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

Check your SBOMs for free