{"id":"CVE-2025-1391","aliases":["CVE-2025-1391","GHSA-gvgg-2r3r-53x7"],"related":[],"kind":"vulnerability","state":"published","title":"Keycloak-services: improper authorization in keycloak organization mapper allows unauthorized organization claims","summary":"A flaw was found in the Keycloak organization feature, which allows the incorrect assignment of an organization to a user if their username or email matches the organization’s domain pattern. This issue occurs at the mapper level, leading to misrepresentation in tokens. If an application relies on these claims for authorization, it may incorrectly assume a user belongs to an organization they are not a member of, potentially granting unauthorized access or privileges.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"A flaw was found in the Keycloak organization feature, which allows the incorrect assignment of an organization to a user if their username or email matches the organization’s domain pattern. This issue occurs at the mapper level, leading to misrepresentation in tokens. If an application relies on these claims for authorization, it may incorrectly assume a user belongs to an organization they are not a member of, potentially granting unauthorized access or privileges.","source":"cvelist"},{"lang":"en","text":"This vulnerability is caused by the improper mapping of users to organizations based solely on email/username patterns. The issue is limited to the token claim level, meaning the user is not truly added to the organization but may appear as such in applications relying on these claims. The risk increases in scenarios where self-registration is enabled and unrestricted, allowing an attacker to exploit the naming pattern. The issue is mitigated if admins restrict registration or use strict validation mechanisms.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Se encontró una falla en la función de organización de Keycloak, que permite la asignación incorrecta de una organización a un usuario si su nombre de usuario o correo electrónico coincide con el patrón de dominio de la organización. Este problema ocurre en el nivel del asignador, lo que genera una representación errónea en los tokens. Si una aplicación se basa en estas afirmaciones para la autorización, puede asumir incorrectamente que un usuario pertenece a una organización de la que no es miembro, lo que podría otorgar acceso o privilegios no autorizados.","source":"nvd"}],"published":"2025-02-17T14:01:35.354Z","modified":"2026-09-21T06:17:00.010Z","severity":{"scorer":"redhat","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"redhat","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-284"],"affected":[{"ranges":[{"type":"semver","introduced":"26.0.0","fixed":"26.0.10","status":"affected"}],"package":"keycloak-services","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Build of Keycloak","package":"keycloak-services","cpe":"cpe:/a:redhat:build_keycloak:26.0","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"26.0.10-3","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat build of Keycloak 26.0","package":"rhbk/keycloak-operator-bundle","cpe":"cpe:/a:redhat:build_keycloak:26.0::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"26.0-11","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat build of Keycloak 26.0","package":"rhbk/keycloak-rhel9","cpe":"cpe:/a:redhat:build_keycloak:26.0::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"26.0-12","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat build of Keycloak 26.0","package":"rhbk/keycloak-rhel9-operator","cpe":"cpe:/a:redhat:build_keycloak:26.0::el9","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"26.1.0","status":"affected","fixed":"26.1.3"}],"ecosystem":"Maven","package":"org.keycloak:keycloak-services","purl":"pkg:maven/org.keycloak/keycloak-services","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"26.0.10"}],"ecosystem":"Maven","package":"org.keycloak:keycloak-services","purl":"pkg:maven/org.keycloak/keycloak-services","source":"ghsa"}],"references":[{"url":"https://access.redhat.com/errata/RHSA-2025:2544","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2025:2545","tags":["vendor-advisory","web","x-refsource-redhat"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2025-1391","tags":["vdb-entry","web","x-refsource-redhat"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2346082","tags":["issue-tracking","web","x-refsource-redhat"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/keycloak/keycloak/issues/37169","tags":[],"sources":["cvelist","nvd"]},{"url":"https://github.com/keycloak/keycloak/pull/37235","tags":[],"sources":["cvelist","nvd"]},{"url":"https://github.com/keycloak/keycloak/security/advisories/GHSA-gvgg-2r3r-53x7","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-1391","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/keycloak/keycloak/commit/5aa2b4c75bb474303ab807017582bc01a9f7e378","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/keycloak/keycloak","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"redhat","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-02-18T17:17:45.272Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-1391","url":"https://www.cve.org/CVERecord?id=CVE-2025-1391","licence":"CVE Terms of Use","modified":"2026-09-21T05:46:57.579Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gvgg-2r3r-53x7","url":"https://github.com/advisories/GHSA-gvgg-2r3r-53x7","licence":"CC-BY-4.0","modified":"2025-03-10T21:26:49.577Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-1391","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-1391","licence":"Public domain","modified":"2026-09-21T06:17:00.010Z"}],"updatedAt":"2026-11-25T22:58:54.143Z","epss":{"score":0.00464,"percentile":0.41866,"date":"2026-12-02T12:00:21.000Z"}}