CVE-2026-37980: Org.keycloak.forms.login: keycloak: keycloak: arbitrary code execution via stored cross-site scripting (xss) in organization selection login page

Published Apr 6, 2026
·
Updated

A flaw was found in Keycloak, specifically in the organization selection login page. A remote attacker with manage-realm or manage-organizations administrative privileges can exploit a Stored Cross-Site Scripting (XSS) vulnerability. This flaw occurs because the organization.alias is placed into an inline JavaScript onclick handler, allowing a crafted JavaScript payload to execute in a user's browser when they view the login page. Successful exploitation enables arbitrary JavaScript execution, potentially leading to session theft, unauthorized account actions, or further attacks against users of the affected realm.

Other sources

Stored Cross-Site Scripting (XSS) vulnerability in the organization selection login page of Keycloak. The flaw is caused by placing organization.alias into an inline JavaScript onclick handler, where browser HTML decoding bypasses FreeMarker’s HTML escaping. When an attacker-controlled alias containing a crafted JavaScript payload is rendered on the organization selection page, the payload can execute in the context of any user’s browser. This can be exploited remotely by an admin with manage-realm or manage-organizations privileges, without further user interaction beyond viewing the login page. Successful exploitation allows execution of arbitrary JavaScript, enabling session theft, account actions, or further attacks against users of the affected realm.

Red Hat

Affected Software

2 affected components
Keycloak Keycloak
redhat Build Of Keycloak

Event History

Apr 6, 2026
Data Sourced
via Red Hat·07:51 AM
DescriptionSeverityAffected Software
Apr 14, 2026
CVE Published
via MITRE·02:54 PM
Data Sourced
via MITRE·02:54 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:16 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-37980?

CVE-2026-37980 has been classified as a high severity vulnerability.

2

How do I fix CVE-2026-37980?

To fix CVE-2026-37980, update your Keycloak installation to the latest patched version that addresses this vulnerability.

3

Who is affected by CVE-2026-37980?

Keycloak installations that allow unauthorized access to the organization selection login page are affected by CVE-2026-37980.

4

What type of vulnerability is CVE-2026-37980?

CVE-2026-37980 is a stored cross-site scripting (XSS) vulnerability.

5

Can CVE-2026-37980 be exploited remotely?

Yes, CVE-2026-37980 can be exploited remotely by an attacker with certain administrative privileges.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203