CVE-2020-27826 Authentication Bypass in keycloak
Attackers can modify their own NameID attribute via the Account REST API to impersonate admin users, leading to privilege escalation.
- 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-2020-27826?
CVE-2020-27826 is a medium-severity vulnerability in Redhat Keycloak, published on 28 May 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
A flaw was found in Keycloak before version 12.0.0 where it is possible to update the user's metadata attributes using Account REST API. This flaw allows an attacker to change its own NameID attribute to impersonate the admin user for any particular application.
Weakness: CWE-250
Which versions are affected by CVE-2020-27826?
2 open source packages ship an affected version, including org.keycloak:keycloak-core. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
org.keycloak:keycloak-core Maven | All versions | 12.0.0 |
org.keycloak:keycloak-core Maven | All versions | 12.0.0 |
Linux distribution packages (6)
rh-sso7-keycloak Red Hat:red_hat_single_sign_on:7::el6 | All versions | 0:9.0.10-1.redhat_00001.1.el6sso |
rh-sso7-keycloak-server Red Hat:red_hat_single_sign_on:7::el6 | All versions | 0:9.0.10-1.redhat_00001.1.el6sso |
rh-sso7-keycloak Red Hat:red_hat_single_sign_on:7::el7 | All versions | 0:9.0.10-1.redhat_00001.1.el7sso |
rh-sso7-keycloak-server Red Hat:red_hat_single_sign_on:7::el7 | All versions | 0:9.0.10-1.redhat_00001.1.el7sso |
rh-sso7-keycloak Red Hat:red_hat_single_sign_on:7::el8 | All versions | 0:9.0.10-1.redhat_00001.1.el8sso |
rh-sso7-keycloak-server Red Hat:red_hat_single_sign_on:7::el8 | All versions | 0:9.0.10-1.redhat_00001.1.el8sso |
Products include Redhat Keycloak, Redhat Single Sign-On.
How do I fix CVE-2020-27826?
Upgrade org.keycloak:keycloak-core to 12.0.0 or later.
Is CVE-2020-27826 being exploited?
There is no known exploitation of CVE-2020-27826 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-m9cj-v55f-8x26, RHSA-2020:5526, RHSA-2020:5527, RHSA-2020:5528.