{
  "threat_severity" : "Moderate",
  "public_date" : "2026-05-27T12:45:59Z",
  "bugzilla" : {
    "description" : "keycloak: Keycloak: Privilege escalation due to oversized subject_token JWT",
    "id" : "2481877",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2481877"
  },
  "cvss3" : {
    "cvss3_base_score" : "6.8",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N",
    "status" : "verified"
  },
  "cwe" : "CWE-1284",
  "details" : [ "A flaw was found in Keycloak. An authenticated user with low privileges can exploit this vulnerability by sending an oversized subject_token JSON Web Token (JWT) to the TokenEndpoint. When the token exceeds a 4000-character limit, it is silently dropped, causing the system to fall back to client credentials. This allows the user to gain the permissions of the client's service account, leading to privilege escalation.", "A flaw was found in Keycloak. An authenticated user with low privileges can exploit this vulnerability by sending an oversized subject_token JSON Web Token (JWT) to the TokenEndpoint. When the token exceeds a 4000-character limit, it is silently dropped, causing the system to fall back to client credentials. This allows the user to gain the permissions of the client's service account, leading to privilege escalation." ],
  "statement" : "This Moderate flaw in Keycloak allows an authenticated, low-privileged user to escalate privileges. By submitting an oversized `subject_token` JWT to the TokenEndpoint, the system defaults to client credentials, granting the attacker the client's service account permissions. This bypass occurs when the token exceeds a 4000-character limit, leading to an unintended privilege gain.",
  "acknowledgement" : "Red Hat would like to thank Filip Jovanov (PegasusMKD) for reporting this issue.",
  "affected_release" : [ {
    "product_name" : "Red Hat build of Keycloak 26.4",
    "release_date" : "2026-06-25T00:00:00Z",
    "advisory" : "RHSA-2026:30050",
    "cpe" : "cpe:/a:redhat:build_keycloak:26.4::el9",
    "package" : "rhbk/keycloak-operator-bundle:26.4.13-1"
  }, {
    "product_name" : "Red Hat build of Keycloak 26.4",
    "release_date" : "2026-06-25T00:00:00Z",
    "advisory" : "RHSA-2026:30050",
    "cpe" : "cpe:/a:redhat:build_keycloak:26.4::el9",
    "package" : "rhbk/keycloak-rhel9:26.4-19"
  }, {
    "product_name" : "Red Hat build of Keycloak 26.4",
    "release_date" : "2026-06-25T00:00:00Z",
    "advisory" : "RHSA-2026:30050",
    "cpe" : "cpe:/a:redhat:build_keycloak:26.4::el9",
    "package" : "rhbk/keycloak-rhel9-operator:26.4-19"
  }, {
    "product_name" : "Red Hat build of Keycloak 26.4.13",
    "release_date" : "2026-06-25T00:00:00Z",
    "advisory" : "RHSA-2026:30049",
    "cpe" : "cpe:/a:redhat:build_keycloak:26.4::el9",
    "package" : "rhbk/keycloak-rhel9"
  }, {
    "product_name" : "Red Hat build of Keycloak 26.6",
    "release_date" : "2026-06-10T00:00:00Z",
    "advisory" : "RHSA-2026:25097",
    "cpe" : "cpe:/a:redhat:build_keycloak:26.6::el9",
    "package" : "rhbk/keycloak-operator-bundle:26.6.3-3"
  }, {
    "product_name" : "Red Hat build of Keycloak 26.6",
    "release_date" : "2026-06-10T00:00:00Z",
    "advisory" : "RHSA-2026:25097",
    "cpe" : "cpe:/a:redhat:build_keycloak:26.6::el9",
    "package" : "rhbk/keycloak-rhel9:26.6-6"
  }, {
    "product_name" : "Red Hat build of Keycloak 26.6",
    "release_date" : "2026-06-10T00:00:00Z",
    "advisory" : "RHSA-2026:25097",
    "cpe" : "cpe:/a:redhat:build_keycloak:26.6::el9",
    "package" : "rhbk/keycloak-rhel9-operator:26.6-6"
  }, {
    "product_name" : "Red Hat build of Keycloak 26.6.3",
    "release_date" : "2026-06-10T00:00:00Z",
    "advisory" : "RHSA-2026:25098",
    "cpe" : "cpe:/a:redhat:build_keycloak:26.6::el9",
    "package" : "rhbk/keycloak-rhel9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2026-9704\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-9704" ],
  "name" : "CVE-2026-9704",
  "mitigation" : {
    "value" : "To prevent the silent dropping of oversized `subject_token` JWTs, configure Keycloak to enforce strict parameter validation. This involves setting the `fail-fast` parameter to `true` for the `TokenEndpoint` configuration, which will cause requests with oversized parameters to be rejected explicitly rather than silently processed with reduced privileges. Consult Keycloak documentation for the exact method to modify these settings. A restart of the Keycloak service may be necessary for the changes to apply.",
    "lang" : "en:us"
  },
  "csaw" : false
}