{
  "id": "CVE-2026-9795",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-9795",
  "published_at": "2026-05-28T03:49:10.874Z",
  "title": "Keycloak: keycloak: privilege escalation via improper scope mapping enforcement",
  "vendor": "Red Hat",
  "product": "Red Hat build of Keycloak 26.4",
  "cvss": {
    "score": 7.3,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "A flaw was found in Keycloak's Fine-Grained Admin Permissions (FGAPv2) feature. An administrator with limited client management permissions can exploit this vulnerability to assign any realm role, including highly privileged roles, to a client's scope mapping. This bypasses intended security controls, allowing the injected role to be projected into a user's authentication token when they access the modified client. This could lead to unauthorized privilege escalation within the Keycloak realm.",
  "cwe": "CWE-266",
  "cpes": [
    "cpe:2.3:a:redhat:build_of_keycloak:-:*:*:*:-:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.3
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Red Hat",
        "product": "Red Hat build of Keycloak 26.4",
        "ranges": null,
        "fixed_in": [
          "26.4.13-1"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat build of Keycloak 26.4",
        "ranges": null,
        "fixed_in": [
          "26.4-19"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat build of Keycloak 26.4",
        "ranges": null,
        "fixed_in": [
          "26.4-19"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat build of Keycloak 26.6",
        "ranges": null,
        "fixed_in": [
          "26.6.4-2"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat build of Keycloak 26.6",
        "ranges": null,
        "fixed_in": [
          "26.6-8"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat build of Keycloak 26.6",
        "ranges": null,
        "fixed_in": [
          "26.6-8"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Red Hat build of Keycloak 26.4 to 26.4.13-1 or later.",
      "Upgrade Red Hat build of Keycloak 26.4 to 26.4-19 or later.",
      "Upgrade Red Hat build of Keycloak 26.4 to 26.4-19 or later.",
      "Upgrade Red Hat build of Keycloak 26.6 to 26.6.4-2 or later.",
      "Upgrade Red Hat build of Keycloak 26.6 to 26.6-8 or later.",
      "Upgrade Red Hat build of Keycloak 26.6 to 26.6-8 or later."
    ],
    "workarounds": [
      "To mitigate this issue, disable the Fine-Grained Admin Permissions (FGAPv2) feature in Keycloak if it is not strictly required. This can typically be done by setting `adminPermissionsEnabled` to `false` in the realm configuration. Disabling FGAPv2 will prevent the exploitation of this flaw by removing the vulnerable functionality. However, this may impact administrative delegation capabilities within Keycloak. A restart or reload of the Keycloak service may be required for the changes to take effect."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://access.redhat.com/errata/RHSA-2026:30049"
      },
      {
        "kind": "Vendor advisory",
        "url": "https://access.redhat.com/errata/RHSA-2026:30050"
      },
      {
        "kind": "Vendor advisory",
        "url": "https://access.redhat.com/errata/RHSA-2026:30083"
      },
      {
        "kind": "Vendor advisory",
        "url": "https://access.redhat.com/errata/RHSA-2026:30084"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
