InfraRunBook
    Back to articles

    CVE-2026-120984: Red Hat Keycloak code execution via inline JavaScript policy import - affected versions and fix

    CVE Advisories
    Published: Nov 7, 2026
    Updated: Nov 7, 2026

    CVE-2026-120984 lets an authenticated user with client management permissions in Keycloak upload a malicious JavaScript policy and run code on the server. Red Hat rates it 9.1 Critical, and the advisory does not state affected or fixed versions.

    CVE-2026-120984: Red Hat Keycloak code execution via inline JavaScript policy import - affected versions and fix

    At a glance

    • CVE ID(s): CVE-2026-120984
    • Severity: 9.1 CRITICAL (CVSS v3.1, scored by Red Hat). Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
    • Vendor / product: Red Hat - Red Hat Build of Keycloak, Red Hat Single Sign-On 7
    • Affected versions: Not stated in the advisory - check the vendor page. The record lists the products with a default status of affected, but gives no version ranges.
    • Fixed / patched versions: Not stated in the advisory - check the vendor page
    • Exploited in the wild: No known exploitation (not listed in CISA KEV)
    • Attack vector: Network. Authentication needed, with client management permissions (high privileges). No user interaction.
    • Published by: Red Hat (CNA), published 2026-11-07
    • Official advisory: https://access.redhat.com/security/cve/CVE-2026-120984

    What is this vulnerability?

    This is a code injection flaw (CWE-94) in the client management component of the Keycloak server. Keycloak can attach authorization services to a client. When a client is created or imported with authorization services enabled, the server uses an internal session attribute during setup.

    According to the record, the server fails to clear that attribute properly after setup. That lets an authenticated user with client management permissions get around a security control and upload a malicious JavaScript policy. The server then executes that policy when an authorization request is made.

    The advisory title describes the path as manage-clients to arbitrary code execution through inline JavaScript policy import. In plain terms, a permission meant to let someone manage clients can be turned into the ability to run code on the host.

    The record gives no more technical detail, and this article does not add any.

    How does it affect you?

    The impact is arbitrary code execution on the Keycloak server. Red Hat scores confidentiality, integrity and availability all as High. Scope is Changed, which means the damage can go beyond the Keycloak component itself.

    Keycloak usually sits at the centre of authentication. A compromised server may expose:

    • Signing keys and realm configuration
    • Client secrets and identity provider settings
    • Database credentials held in the server configuration
    • The ability to issue or alter tokens for the applications that trust it

    The realistic risk depends on who holds the manage-clients permission. The attacker needs a valid account with that right, so this is not an anonymous internet attack. The score is 9.1 rather than higher because of that privilege requirement. Still, many environments delegate client management to application teams, CI service accounts, or tenant admins. In those setups, one stolen or misused account is enough to reach the server.

    There is no known exploitation. The CVE is not in CISA's KEV catalog. Treat that as a point in time, not a guarantee.

    Who is affected?

    The record lists these products as affected by default:

    • Red Hat Build of Keycloak
    • Red Hat Single Sign-On 7

    No version ranges, platforms or fixed builds are given. Treat every deployment of these products as potentially affected until the vendor page says otherwise. The advisory does not say whether upstream community Keycloak is affected. Check the vendor page for that.

    You are at highest risk if all of these apply:

    • You run one of the products above.
    • Accounts other than your core admins hold client management permissions.
    • Authorization services are in use, or clients can be created or imported with them enabled.

    The advisory does not say that authorization services must already be in use on your server. Do not assume you are safe because you do not use them today.

    How to check if you are vulnerable

    The advisory gives no version list, so a version check alone cannot settle this. Work through these steps:

    1. Inventory every Red Hat Build of Keycloak and Red Hat Single Sign-On 7 instance, including test and staging.
    2. Record the exact product and build for each. Compare against the fixed builds on the Red Hat CVE page once they are published there.
    3. List who holds client management permissions, directly or through roles and groups, in every realm. Include service accounts and automation.
    4. Find clients with authorization services enabled. Look for policies of the JavaScript type and check who created them and when.
    5. Review admin event history for client creation and import activity you do not recognise.

    If you cannot confirm a fixed build, assume you are vulnerable.

    How to fix and recover

    The record lists no solutions and no fixed versions. Do this:

    1. Open the Red Hat advisory and the Bugzilla entry listed in the references. Look for errata and fixed builds for your product stream.
    2. When a fix is published, test it in staging, then upgrade production. Use Red Hat's own update process for your deployment type.
    3. After patching, confirm the running build matches the fixed build named by Red Hat. Then confirm that creating or importing a client with authorization services still behaves as expected.

    If you think the flaw was used against you, treat the server as compromised:

    • Rotate realm signing keys, client secrets, identity provider secrets, and any database or service credentials the server could read.
    • Reset credentials for accounts holding client management rights.
    • Review and remove unexpected JavaScript policies and recently added or imported clients.
    • Check the host for unexpected processes, files, scheduled tasks and outbound connections.
    • Restore configuration from a known-good backup if you cannot prove it is clean. Consider rebuilding the host.
    • Invalidate active sessions and tokens after rotating keys.

    Workarounds and mitigations

    Red Hat states that a mitigation is either not available or does not meet its criteria for ease of use, applicability and stability. There is no vendor-endorsed workaround.

    These steps are general risk reduction, not a fix from the vendor:

    • Cut the number of accounts with client management permissions to the minimum.
    • Review service accounts and automation that can create or import clients.
    • Limit network access to the admin console and admin APIs to trusted management networks.
    • Require strong authentication for administrators.
    • Run Keycloak under a least-privilege account with limited access to the rest of your network.

    None of these remove the flaw. They only reduce who can reach it.

    What to monitor

    • Admin events for client creation, client import and policy changes, especially from accounts that do not normally do this work.
    • New or changed JavaScript-type policies on clients with authorization services.
    • Unexpected child processes or file writes from the Keycloak process.
    • Outbound connections from the Keycloak host to unfamiliar destinations.
    • Logins by accounts holding client management rights from new locations or at odd hours.
    • The Red Hat CVE page, for fixed builds and updated guidance.

    References

    Frequently Asked Questions

    Is CVE-2026-120984 exploited in the wild?

    No known exploitation. The CVE is not listed in CISA's Known Exploited Vulnerabilities catalog.

    Do I need to be logged in to exploit CVE-2026-120984?

    Yes. The attacker needs an authenticated account with client management permissions. No user interaction is required.

    Which versions are fixed?

    Not stated in the advisory - check the vendor page. The record lists no fixed versions and no solutions.

    Is there a workaround?

    Red Hat says no mitigation is available that meets its criteria. You can reduce risk by limiting who has client management permissions and restricting access to the admin interfaces.

    Which products are affected?

    Red Hat Build of Keycloak and Red Hat Single Sign-On 7 are listed as affected. No version ranges are given.

    Related Articles

    CVE-2026-123903: VMware vCenter Server authentication bypass - affected versions and fix

    CVE-2026-123903 is a critical (CVSS 9.8) authentication bypass in the VMware Directory Service used by VMware vCenter Server. Broadcom lists fixed releases for vCenter 9.1, 9.0 and 8.0, VMware Cloud Foundation 5.x and the Telco Cloud products.

    CVE-2026-123910, CVE-2026-123911, CVE-2026-123912: VMware ESX critical I/O filter and XHCI flaws - affected versions and fix

    Broadcom disclosed three critical VMware ESX flaws: two in the I/O filter service (CVSS 9.8, network-reachable, no authentication) and one in the XHCI USB controller (CVSS 9.3). Fixed builds are available for ESX 9.1, 9.0 and 8.0, VCF 5.x and Telco Cloud Platform.

    CVE-2026-136412: OpenResty stream-lua-nginx-module use-after-free via receiveuntil() - affected versions and fix

    CVE-2026-136412 is a use-after-free in OpenResty stream-lua-nginx-module before 0.0.20rc4. A garbage-collected receiveuntil() iterator can leave a stale pointer that crashes or corrupts the nginx worker. Upgrade to 0.0.20rc4 or later.

    CVE-2026-123172: SolarWinds Serv-U privilege escalation to root on Linux - affected versions and fix

    CVE-2026-123172 is a privilege escalation flaw in SolarWinds Serv-U 2026.3 and earlier. It can lead to root on Linux installs, and the risk is lower on Windows. SolarWinds fixed it in Serv-U 2026.4.

    CVE-2026-82321 and 7 more: SolarWinds Serv-U privilege escalation flaws - affected 2026.3 and below, fixed in 2026.4

    SolarWinds disclosed eight privilege escalation flaws in Serv-U 2026.3 and earlier. Each lets a domain administrator or higher gain more access. SolarWinds fixed all eight in Serv-U 2026.4. No exploitation is known.

    CVE-2026-134624: N-able MailAssure (SpamExperts) SSRF in relay LDAP sync check - affected versions and fix

    CVE-2026-134624 is a server-side request forgery flaw in N-able MailAssure (SpamExperts) before 20261121.1943. An authenticated API user can make the server probe internal hosts and ports and send crafted data to internal services. It is listed in CISA KEV.

    CVE-2026-120984: Red Hat Keycloak code execution via inline JavaScript