GHSA-gp8g-f42f-95q2 CVE-2024-29892 GO-2024-2664
ZITADEL's actions can overload reserved claims
- Severity
- 0.0 / 10
- Medium · CVSS 4.0
- Exploit chance (EPSS)
- 0.77%
- Chance of exploitation in the next 30 days. Higher than 55.55% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-863 Incorrect Authorization
- Fix
2.42.17- Upgrade github.com/zitadel/zitadel to this version or later
Description
Impact
Under certain circumstances an action could set reserved claims managed by ZITADEL.
For example it would be possible to set the claim urn:zitadel:iam:user:resourceowner:name
{"urn:zitadel:iam:user:resourceowner:name": "ACME"}
if it was not set by ZITADEL itself.
To compensate for this we introduced a protection that does prevent actions from changing claims that start with urn:zitadel:iam
Patches
2.x versions are fixed on >= 2.48.3 2.47.x versions are fixed on >= 2.47.8 2.46.x versions are fixed on >= 2.46.5 2.45.x versions are fixed on >= 2.45.5 2.44.x versions are fixed on >= 2.44.7 2.43.x versions are fixed on >= 2.43.11 2.42.x versions are fixed on >= 2.42.17
Workarounds
No workaround available since a patch is available
Credits
Many thanks to @schettn whose disclosure of another topic lead us to find this issue.
Affected versions
Go
| Package | Vulnerable | Fixed in |
|---|---|---|
| github.com/zitadel/zitadel | < 2.42.17 |
2.42.17 |
| github.com/zitadel/zitadel | >= 2.43.0, < 2.43.11 |
2.43.11 |
| github.com/zitadel/zitadel | >= 2.44.0, < 2.44.7 |
2.44.7 |
| github.com/zitadel/zitadel | >= 2.45.0, < 2.45.5 |
2.45.5 |
| github.com/zitadel/zitadel | >= 2.46.0, < 2.46.5 |
2.46.5 |
| github.com/zitadel/zitadel | >= 2.47.0, < 2.47.8 |
2.47.8 |
| github.com/zitadel/zitadel | >= 2.48.0, < 2.48.3 |
2.48.3 |
| github.com/zitadel/zitadel | all versions |
No fix yet |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
github.com/zitadel/zitadel Go → 2.42.17
- go
go get github.com/zitadel/zitadel@v2.42.17 && go mod tidy
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- High
- User interaction
- Active
- Confidentiality (vulnerable system)
- High
- Integrity (vulnerable system)
- High
- Availability (vulnerable system)
- None
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
CVSS 3.1 6.1
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- High
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Weakness
CWE-863: Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.
How to prevent it
- Architecture and Design: Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- Architecture and Design: Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
- Architecture and Design: For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
- System Configuration, Installation: Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.
References
Advisories
Packages
Other links
- github.com/zitadel/zitadel/security/advisories/GHSA-gp8g-f42f-95q2
- github.com/zitadel/zitadel/releases/tag/v2.42.17
- github.com/zitadel/zitadel/releases/tag/v2.43.11
- github.com/zitadel/zitadel/releases/tag/v2.44.7
- github.com/zitadel/zitadel/releases/tag/v2.45.5
- github.com/zitadel/zitadel/releases/tag/v2.46.5
- github.com/zitadel/zitadel/releases/tag/v2.47.8
- github.com/zitadel/zitadel/releases/tag/v2.48.3
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-fgmf-7rf8-m6vf ZITADEL: Actions V1 sandbox escape: host file read via require() | High | Also affects github.com/zitadel/zitadel |
| GHSA-9993-rfwp-rhwf ZITADEL: MFA bypass via session reuse in Login V2 | High | Also affects github.com/zitadel/zitadel |
| GHSA-v859-c572-qh5p ZITADEL: Improper Role Revocation on Granted Projects during Multiple Role Deletions | Medium | Also affects github.com/zitadel/zitadel |
| GHSA-jq8w-8q2f-ffm9 ZITADEL Users Can Self-Verify Email/Phone via API | High | Also affects github.com/zitadel/zitadel |
| GHSA-vrh8-c9cm-wh8v ZITADEL: Unauthorized Token Privilege Escalation in OAuth2 Token Exchange | High | Also affects github.com/zitadel/zitadel |
| GHSA-992q-9gwp-7r79 ZITADEL: Auto-linking by email: IdP-side email verification is not checked | Medium | Also affects github.com/zitadel/zitadel |
| GHSA-v77h-2w3m-94hx ZITADEL: Missing Token Expiration (`exp`) Validation in JWT IdP Provider | Medium | Also affects github.com/zitadel/zitadel |
| GHSA-g5h5-m4hm-xjrr ZITADEL: Missing Token Audience Validation (`aud`) in JWT IdP Provider | Medium | Also affects github.com/zitadel/zitadel |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor