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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.9
- **CVSS:** 6.9 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: High; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.51% (percentile 37, 2026-11-26)
- **CWE:** CWE-79
- **Aliases:** GHSA-m32f-8vh9-2hh3
- **Published:** 2026-04-14T14:54:42.871Z
- **Modified:** 2026-10-26T21:10:00.170Z

## Who should check

- Projects that depend on Maven package org.keycloak:keycloak-services (\<= 26.5.5)
- Anyone running Red Hat build of Keycloak 26.4.12 (versions: see the vendor advisory)
- Anyone running Red Hat Build of Keycloak all versions

## Description

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.

## Affected and fixed versions

- Maven `org.keycloak:keycloak-services`: affected \<= 26.5.5; fixed no fix listed yet (osv)
- Red Hat build of Keycloak 26.4.12: see vendor advisory (cvelist)
- Red Hat Build of Keycloak: all versions (cvelist)

## Mitigation

- Vendor workaround: Restrict access to the Keycloak administration console and login pages to trusted networks only, ideally through a VPN or by configuring firewall rules. Furthermore, ensure that only highly trusted administrators are granted \`manage-realm\` or \`manage-organizations\` privileges within Keycloak. Regularly review and audit administrative accounts and their assigned roles to minimize the risk of unauthorized access and exploitation. If the Keycloak service is restarted or reloaded, these network and access restrictions will persist.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-37980. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-37980.md
Affected: org.keycloak:keycloak-services <= 26.5.5
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for org.keycloak:keycloak-services (Maven), Red Hat build of Keycloak 26.4.12, Red Hat Build of Keycloak: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-37980 being exploited?

There is no confirmed exploitation: CVE-2026-37980 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.51% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-37980?

Medium: CVSS 6.9 (v3.1, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-37980?

org.keycloak:keycloak-services \<= 26.5.5.

### Is there a fix for CVE-2026-37980?

No fixed version is listed in the sources yet. Vendor workaround: Restrict access to the Keycloak administration console and login pages to trusted networks only, ideally through a VPN or by configuring firewall rules. Furthermore, ensure that only highly trusted administrators are granted \`manage-realm\` or \`manage-organizations\` privileges within Keycloak. Regularly review and audit administrative accounts and their assigned roles to minimize the risk of unauthorized access and exploitation. If the Keycloak service is restarted or reloaded, these network and access restrictions will persist.

### How do I check if I'm affected by CVE-2026-37980?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://access.redhat.com/errata/RHSA-2026:19596>
- vendor: <https://access.redhat.com/security/cve/CVE-2026-37980>
- vendor: <https://bugzilla.redhat.com/show_bug.cgi?id=2455325>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-37980>
- other: <https://github.com/keycloak/keycloak/issues/48049>
- other: <https://github.com/keycloak/keycloak>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-37980>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-m32f-8vh9-2hh3> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-37980> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-37980>
