{"id":"GHSA-j24h-w6rf-r4c6","aliases":["DHI-fhjh-gqqz-o6ga-2p7c"],"status":"published","description":"### Summary\r\n\r\nZITADEL’s **Management API** allowed a user with permission to manage user grants (`user.grant.write`, held for example by `ORG_OWNER` and `ORG_USER_MANAGER`) in *any* organization to change the roles of user grants that belong to a *different* organization on the same instance. The update endpoint `PUT /management/v1/users/{user_id}/grants/{grant_id}` (`UpdateUserGrant`) checked the caller’s permission in their own organization, but then found and changed the grant by its ID alone, whichever organization owned it.\r\n\r\nOn instances that enabled the opt-in user-grant performance setting (`IMPROVED_PERFORMANCE_USER_GRANT`), the same missing check was also reachable when creating grants: through `POST /management/v1/users/{user_id}/grants` (`AddUserGrant`) and the Authorization Service v2 `CreateAuthorization`, an organization could assign roles on another organization’s project that had never been delegated to it. Both paths share the same root cause: a user-grant write was not limited to grants and projects the caller’s organization is responsible for.\r\n\r\n### Impact\r\n\r\nAn attacker with `user.grant.write` in any organization of the instance can:\r\n\r\n- **Change the roles on another organization’s user grants**, given the grant’s ID, to any role defined on that organization’s project (for example, from a viewer role to an administrative role).\r\n- **Raise their own access** in an organization that has delegated them a role, because users can look up the IDs of their own grants.\r\n- **Remove all roles from another organization’s user grants** while the grants remain active, which silently takes away access from legitimate users.\r\n- On instances with `IMPROVED_PERFORMANCE_USER_GRANT` enabled: **create grants on another organization’s project** without a project grant (delegation), assigning any role defined on that project.\r\n\r\nThe impact is at the level of projects and applications. The changed roles appear in the user’s `urn:zitadel:iam:org:project:roles` claim, so the real impact is whatever those roles grant inside applications that trust the victim organization’s project. The attacker can only assign roles that already exist on the targeted project, and through the update path can only change grants that already exist. The issue does **not** grant ZITADEL administrative roles (organization or instance memberships). On instances without `IMPROVED_PERFORMANCE_USER_GRANT` (the default), grant creation already enforced this check, so only the update path is affected there.\r\n\r\n**Scope note:** The affected surface is the **Management API** endpoints named above and, with the performance setting enabled, the Authorization Service v2 `CreateAuthorization`. The Authorization Service v2 `UpdateAuthorization` and the deactivate, reactivate and remove endpoints for user grants were not affected. The issue crosses organization boundaries within an instance, but not instance boundaries.\r\n\r\n### Affected Versions\r\n\r\nSystems running one of the following versions are affected:\r\n\r\n* **4.x:** `4.0.0` through `4.20.7` (including RC versions)\r\n\r\n### Patches\r\n\r\nThe vulnerability has been addressed in the latest releases.\r\n\r\nThe patched version only lets the Management API’s `UpdateUserGrant` change a user grant that belongs to the organization the request runs in, which is the organization given in the `x-zitadel-orgid` header or else the caller’s own organization. Requests for grants of other organizations now return “not found”. This also applies to an organization that owns a project and tries to update grants that an organization it delegated the project to created on that project. Instance administrators who manage grants across organizations must set `x-zitadel-orgid` to the grant’s organization or use the Authorization Service v2 `UpdateAuthorization`.\r\n\r\nCreating a grant on a project owned by another organization now requires a project grant from that organization. Only the roles included in the project grant can be assigned, and the project grant is found automatically when the request leaves it out.\r\n\r\n* **4.x**: Upgrade to $\\ge$ [4.20.8](https://github.com/zitadel/zitadel/releases/tag/v4.20.8)\r\n\r\n### Workarounds\r\n\r\nThe recommended solution is to upgrade to a patched version. There is no configuration that fully closes this gap on unpatched versions.\r\n\r\nAs a partial mitigation, leaving `IMPROVED_PERFORMANCE_USER_GRANT` disabled, or disabling it, closes the grant-creation path only.\r\n\r\n### Questions\r\n\r\nIf you have any questions or comments about this advisory, please email us at security@zitadel.com\r\n\r\n### Credits\r\n\r\nThanks to:\r\n  - Lucas Dodgson from InfoGuard Labs ([@lucasdodgson](https://github.com/lucasdodgson))\r\n  - Adam Korczynski\r\n\r\nfor finding and reporting the vulnerability.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"published":"2026-12-02T14:27:24Z","modified":"2026-12-02T14:30:20Z","affected":[{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"zitadel-4-dev","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-r0"}]}],"versions":["4.20.3-r0","4.20.4-r0","4.20.5-r0","4.20.6-r0","4.20.7-r0","4.20.8-r0","4.21.0-r0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"zitadel-4-dev","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-r0"}]}],"versions":["4.20.3-r0","4.20.4-r0","4.20.5-r0","4.20.6-r0","4.20.7-r0","4.20.8-r0","4.21.0-r0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"zitadel-4-fips-dev","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-r0"}]}],"versions":["4.20.3-r0","4.20.4-r0","4.20.5-r0","4.20.6-r0","4.20.7-r0","4.20.8-r0","4.21.0-r0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"zitadel-4-fips-dev","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-r0"}]}],"versions":["4.20.3-r0","4.20.4-r0","4.20.5-r0","4.20.6-r0","4.20.7-r0","4.20.8-r0","4.21.0-r0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"zitadel-4-fips-license","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-r0"}]}],"versions":["4.20.3-r0","4.20.4-r0","4.20.5-r0","4.20.6-r0","4.20.7-r0","4.20.8-r0","4.21.0-r0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"zitadel-4-fips-license","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-r0"}]}],"versions":["4.20.3-r0","4.20.4-r0","4.20.5-r0","4.20.6-r0","4.20.7-r0","4.20.8-r0","4.21.0-r0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"zitadel-4-fips","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-r0"}]}],"versions":["4.20.3-r0","4.20.4-r0","4.20.5-r0","4.20.6-r0","4.20.7-r0","4.20.8-r0","4.21.0-r0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"zitadel-4-fips","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-r0"}]}],"versions":["4.20.3-r0","4.20.4-r0","4.20.5-r0","4.20.6-r0","4.20.7-r0","4.20.8-r0","4.21.0-r0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"zitadel-4-license","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-r0"}]}],"versions":["4.20.3-r0","4.20.4-r0","4.20.5-r0","4.20.6-r0","4.20.7-r0","4.20.8-r0","4.21.0-r0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"zitadel-4-license","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-r0"}]}],"versions":["4.20.3-r0","4.20.4-r0","4.20.5-r0","4.20.6-r0","4.20.7-r0","4.20.8-r0","4.21.0-r0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"zitadel-4","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-r0"}]}],"versions":["4.20.3-r0","4.20.4-r0","4.20.5-r0","4.20.6-r0","4.20.7-r0","4.20.8-r0","4.21.0-r0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"zitadel-4","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-r0"}]}],"versions":["4.20.3-r0","4.20.4-r0","4.20.5-r0","4.20.6-r0","4.20.7-r0","4.20.8-r0","4.21.0-r0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"zitadel-4-dev","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-0"}]}],"versions":["4.20.3-0","4.20.4-0","4.20.5-0","4.20.6-0","4.20.7-0","4.20.8-0","4.21.0-0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"zitadel-4-fips-dev","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-0"}]}],"versions":["4.20.3-0","4.20.4-0","4.20.5-0","4.20.6-0","4.20.7-0","4.20.8-0","4.21.0-0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"zitadel-4-fips-license","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-0"}]}],"versions":["4.20.3-0","4.20.4-0","4.20.5-0","4.20.6-0","4.20.7-0","4.20.8-0","4.21.0-0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"zitadel-4-fips","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-0"}]}],"versions":["4.20.3-0","4.20.4-0","4.20.5-0","4.20.6-0","4.20.7-0","4.20.8-0","4.21.0-0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"zitadel-4-license","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-0"}]}],"versions":["4.20.3-0","4.20.4-0","4.20.5-0","4.20.6-0","4.20.7-0","4.20.8-0","4.21.0-0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"zitadel-4","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.20.3-0"}]}],"versions":["4.20.3-0","4.20.4-0","4.20.5-0","4.20.6-0","4.20.7-0","4.20.8-0","4.21.0-0"]}],"references":[{"url":"https://scout.docker.com/v/DHI-fhjh-gqqz-o6ga-2p7c","tags":["advisory"]},{"url":"https://github.com/zitadel/zitadel/security/advisories/GHSA-j24h-w6rf-r4c6","tags":["advisory"]}],"sources":{"osv":[{"id":"DHI-fhjh-gqqz-o6ga-2p7c","upstream":["GHSA-j24h-w6rf-r4c6"],"title":"### Summary","description":"### Summary\r\n\r\nZITADEL’s **Management API** allowed a user with permission to manage user grants (`user.grant.write`, held for example by `ORG_OWNER` and `ORG_USER_MANAGER`) in *any* organization to change the roles of user grants that belong to a *different* organization on the same instance. The update endpoint `PUT /management/v1/users/{user_id}/grants/{grant_id}` (`UpdateUserGrant`) checked the caller’s permission in their own organization, but then found and changed the grant by its ID alone, whichever organization owned it.\r\n\r\nOn instances that enabled the opt-in user-grant performance setting (`IMPROVED_PERFORMANCE_USER_GRANT`), the same missing check was also reachable when creating grants: through `POST /management/v1/users/{user_id}/grants` (`AddUserGrant`) and the Authorization Service v2 `CreateAuthorization`, an organization could assign roles on another organization’s project that had never been delegated to it. Both paths share the same root cause: a user-grant write was not limited to grants and projects the caller’s organization is responsible for.\r\n\r\n### Impact\r\n\r\nAn attacker with `user.grant.write` in any organization of the instance can:\r\n\r\n- **Change the roles on another organization’s user grants**, given the grant’s ID, to any role defined on that organization’s project (for example, from a viewer role to an administrative role).\r\n- **Raise their own access** in an organization that has delegated them a role, because users can look up the IDs of their own grants.\r\n- **Remove all roles from another organization’s user grants** while the grants remain active, which silently takes away access from legitimate users.\r\n- On instances with `IMPROVED_PERFORMANCE_USER_GRANT` enabled: **create grants on another organization’s project** without a project grant (delegation), assigning any role defined on that project.\r\n\r\nThe impact is at the level of projects and applications. The changed roles appear in the user’s `urn:zitadel:iam:org:project:roles` claim, so the real impact is whatever those roles grant inside applications that trust the victim organization’s project. The attacker can only assign roles that already exist on the targeted project, and through the update path can only change grants that already exist. The issue does **not** grant ZITADEL administrative roles (organization or instance memberships). On instances without `IMPROVED_PERFORMANCE_USER_GRANT` (the default), grant creation already enforced this check, so only the update path is affected there.\r\n\r\n**Scope note:** The affected surface is the **Management API** endpoints named above and, with the performance setting enabled, the Authorization Service v2 `CreateAuthorization`. The Authorization Service v2 `UpdateAuthorization` and the deactivate, reactivate and remove endpoints for user grants were not affected. The issue crosses organization boundaries within an instance, but not instance boundaries.\r\n\r\n### Affected Versions\r\n\r\nSystems running one of the following versions are affected:\r\n\r\n* **4.x:** `4.0.0` through `4.20.7` (including RC versions)\r\n\r\n### Patches\r\n\r\nThe vulnerability has been addressed in the latest releases.\r\n\r\nThe patched version only lets the Management API’s `UpdateUserGrant` change a user grant that belongs to the organization the request runs in, which is the organization given in the `x-zitadel-orgid` header or else the caller’s own organization. Requests for grants of other organizations now return “not found”. This also applies to an organization that owns a project and tries to update grants that an organization it delegated the project to created on that project. Instance administrators who manage grants across organizations must set `x-zitadel-orgid` to the grant’s organization or use the Authorization Service v2 `UpdateAuthorization`.\r\n\r\nCreating a grant on a project owned by another organization now requires a project grant from that organization. Only the roles included in the project grant can be assigned, and the project grant is found automatically when the request leaves it out.\r\n\r\n* **4.x**: Upgrade to $\\ge$ [4.20.8](https://github.com/zitadel/zitadel/releases/tag/v4.20.8)\r\n\r\n### Workarounds\r\n\r\nThe recommended solution is to upgrade to a patched version. There is no configuration that fully closes this gap on unpatched versions.\r\n\r\nAs a partial mitigation, leaving `IMPROVED_PERFORMANCE_USER_GRANT` disabled, or disabling it, closes the grant-creation path only.\r\n\r\n### Questions\r\n\r\nIf you have any questions or comments about this advisory, please email us at security@zitadel.com\r\n\r\n### Credits\r\n\r\nThanks to:\r\n  - Lucas Dodgson from InfoGuard Labs ([@lucasdodgson](https://github.com/lucasdodgson))\r\n  - Adam Korczynski\r\n\r\nfor finding and reporting the vulnerability.","status":"published","published":"2026-12-02T14:27:24Z","modified":"2026-12-02T14:30:20.729352142Z","updated_at":"2026-12-02T14:44:02.567125Z"}]}}
