Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-w354-2f3c-qvg9

Опубликовано: 01 мар. 2023
Источник: github
Github: Прошло ревью
CVSS3: 6.4

Описание

Keycloak vulnerable to Cross-site Scripting

A flaw was found in Keycloak. Under specific circumstances, HTML entities are not sanitized during user impersonation, resulting in a Cross-site scripting (XSS) vulnerability.

Details

This issue is the result of code found in the exception here: https://github.com/keycloak/keycloak/blob/48835576daa158443f69917ac309e1a7c951bc87/services/src/main/java/org/keycloak/authentication/AuthenticationProcessor.java#L1045

Steps to reproduce

When using the legacy admin console:

  1. Sign in as Admin user in first tab.
  2. In that tab create new user in keycloak admin section > intercept user creation request and modify it by including malicious js script there (in username field).
  3. Sign in as newly created user in second tab (same browser window but second tab).
  4. Navigate back to first tab where you are signed in as admin, navigate to admin console which lists all application users.
  5. Choose any user (except newly created malicious one) – modify anything for that user in his settings. E.g. navigate to credentials tab and set new credentials for him. Also set new password as temporary.
  6. After update for that user is made, use impersonate option on that modified user.
  7. You should see window with form which requires providing new credentials – fill it and submit request.
  8. Just after submiting request user will get notified that “You are already authenticated as different user ‘[user + payload]’ in this session. Please sign out first.” And malicious payload will be executed instantly.

Пакеты

Наименование

org.keycloak:keycloak-services

maven
Затронутые версииВерсия исправления

<= 21.0.0

Отсутствует

EPSS

Процентиль: 36%
0.00152
Низкий

6.4 Medium

CVSS3

Дефекты

CWE-79

Связанные уязвимости

CVSS3: 6.4
redhat
почти 3 года назад

A flaw was found in Keycloak. Under specific circumstances, HTML entities are not sanitized during user impersonation, resulting in a Cross-site scripting (XSS) vulnerability.

CVSS3: 6.4
nvd
больше 2 лет назад

A flaw was found in Keycloak. Under specific circumstances, HTML entities are not sanitized during user impersonation, resulting in a Cross-site scripting (XSS) vulnerability.

CVSS3: 6.4
debian
больше 2 лет назад

A flaw was found in Keycloak. Under specific circumstances, HTML entit ...

CVSS3: 6.4
fstec
почти 3 года назад

Уязвимость объектов HTML программного средства для управления идентификацией и доступом Keycloak, позволяющая нарушителю провести атаку межсайтового скриптинга (XSS)

EPSS

Процентиль: 36%
0.00152
Низкий

6.4 Medium

CVSS3

Дефекты

CWE-79