{"id":"CVE-2025-1391","published":"2025-02-17T14:01:35Z","modified":"2026-09-21T05:46:57Z","title":"Keycloak-services: improper authorization in keycloak organization mapper allows unauthorized organization claims","vendor":"Red Hat","product":"Red Hat Build of Keycloak","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.4,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00474,"percentile":0.40971,"provenance":"source"},"cwes":[{"id":"CWE-284","name":"Improper Access Control"}],"references":[{"url":"https://access.redhat.com/errata/RHSA-2025:2544","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2025:2545","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/security/cve/CVE-2025-1391","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2346082","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://github.com/keycloak/keycloak/issues/37169","tags":[]},{"url":"https://github.com/keycloak/keycloak/pull/37235","tags":[]}],"priority":{"score":12.0,"factors":[{"name":"EPSS percentile","points":8.19},{"name":"CVSS severity","points":3.78}]},"vendorSlug":"red-hat","affectedVersions":[{"vendor":null,"product":null,"versions":[">= 26.0.0, < 26.0.10"]},{"vendor":"Red Hat","product":"Red Hat build of Keycloak 26.0","versions":["all versions"]},{"vendor":"Red Hat","product":"Red Hat build of Keycloak 26.0","versions":["all versions"]},{"vendor":"Red Hat","product":"Red Hat build of Keycloak 26.0","versions":["all versions"]}],"affected":[{"ecosystem":"Maven","package":"org.keycloak:keycloak-services","vulnerableRanges":[">=26.1.0, <26.1.3","<26.0.10"],"patched":["26.1.3","26.0.10"],"from":["GHSA-gvgg-2r3r-53x7"],"provenance":"source"}],"euvd":{"id":"EUVD-2025-4583","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-redhat-com-keycloak-cve-2023-0264","children":[{"from":"CVE-2025-1391","to":"CVE-2025-12110","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["services/src/main/java/org/keycloak/protocol/oidc/TokenManager.java"],"commits":["https://github.com/keycloak/keycloak/commit/54e1c8af1e089ad33d32e0f2792610e4b8df421b","https://github.com/keycloak/keycloak/commit/c830a27928cac4294619af7d147bdff34d4a85e7","https://github.com/keycloak/keycloak/commit/5aa2b4c75bb474303ab807017582bc01a9f7e378"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2024-8883","published":"2024-09-19","fixed":"25.0.6","kev":false},{"cve":"CVE-2025-12390","published":"2025-10-28","fixed":"26.0.0","kev":false},{"cve":"CVE-2024-10270","published":"2024-11-25","fixed":"26.0.6","kev":false,"link":{"from":"CVE-2024-10270","to":"CVE-2025-1391","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.keycloak:keycloak-services","fromFixed":"26.0.6","toFixed":"26.0.10","daysApart":84}]}},{"cve":"CVE-2025-1391","published":"2025-02-17","fixed":"26.1.3","kev":false},{"cve":"CVE-2025-3501","published":"2025-04-29","fixed":"26.2.2","kev":false,"link":{"from":"CVE-2025-1391","to":"CVE-2025-3501","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.keycloak:keycloak-services","fromFixed":"26.1.3","toFixed":"26.2.2","daysApart":71}]}},{"cve":"CVE-2025-3910","published":"2025-04-29","fixed":"26.2.2","kev":false,"link":{"from":"CVE-2025-1391","to":"CVE-2025-3910","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.keycloak:keycloak-services","fromFixed":"26.1.3","toFixed":"26.2.2","daysApart":71}]}},{"cve":"CVE-2025-12110","published":"2025-10-23","fixed":"26.2.3","kev":false},{"cve":"CVE-2025-7365","published":"2025-07-10","fixed":"26.2.6","kev":false,"link":{"from":"CVE-2025-1391","to":"CVE-2025-7365","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.keycloak:keycloak-services","fromFixed":"26.0.10","toFixed":"26.0.13","daysApart":143}]}}],"package":"Maven:org.keycloak:keycloak-services"}}