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

Status: published. Published: 2026-04-14. Updated: 2026-11-26.

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.

## Remediation

- 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. (source: CNA: redhat)

## Affected products and versions

- Red Hat / Red Hat build of Keycloak 26.4.12: Version range not reported. Source: CNA: redhat
- Red Hat / Red Hat Build of Keycloak (rhbk/keycloak-rhel9): Version range not reported. Source: CNA: redhat

## Severity and prioritization

- CVSS 3.1: 6.9 (medium); CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:L/A:N; source: CNA: redhat

- CISA KEV: No listing in collected sources

- EPSS: 0.51% as of 2026-11-26; percentile 36.81%

- SSVC: exploitation none; automatable no; technical impact partial; source ADP: CISA-ADP

- Weaknesses: CWE-79

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://access.redhat.com/errata/RHSA-2026:19596 (CNA: redhat; vendor-advisory, x_refsource_REDHAT)

- https://access.redhat.com/security/cve/CVE-2026-37980 (CNA: redhat; vdb-entry, x_refsource_REDHAT)

- https://bugzilla.redhat.com/show_bug.cgi?id=2455325 (CNA: redhat; issue-tracking, x_refsource_REDHAT)

## Provenance

- CNA: redhat: https://www.cve.org/CVERecord?id=CVE-2026-37980; retrieved 2026-11-26; source updated 2026-11-26

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-37980; retrieved 2026-11-26; source updated Not reported

Revision: 904dcd7f25dab6bf80beb6d759b84a2bc3f7ce969ed689efe621b0411e1eb923

Canonical: https://y2.dev/cve/CVE-2026-37980

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.