Skip to content

ZITADEL Account Takeover via Malicious Host Header Injection

High severity GitHub Reviewed Published Nov 29, 2023 in zitadel/zitadel • Updated Nov 30, 2023

Package

gomod github.com/zitadel/zitadel (Go)

Affected versions

>= 2.39.0, < 2.39.9
>= 2.40.0, < 2.40.10
>= 2.41.0, < 2.41.6

Patched versions

2.39.9
2.40.10
2.41.6

Description

Impact

ZITADEL uses the notification triggering requests Forwarded or X-Forwarded-Host header to build the button link sent in emails for confirming a password reset with the emailed code. If this header is overwritten and a user clicks the link to a malicious site in the email, the secret code can be retrieved and used to reset the users password and take over his account.

Accounts with MFA or Passwordless enabled can not be taken over by this attack.

Patches

The patched ZITADEL versions verify, that the auth requests instance is retrieved by the requests original domain (from the Forwarded or X-Forwarded-Host headers if available). If the instance can't be found using the original host or the auth request can't be found within that instance, ZITADEL throws an error.

2.x versions are fixed on >= 2.41.6
2.40.x versions are fixed on >= 2.40.10
2.39.x versions are fixed on >= 2.39.9

The vulnerablility was introduced with 2.39.0.

Workarounds

A ZITADEL fronting proxy can be configured to delete all Forwarded and X-Forwarded-Host header values before sending requests to ZITADEL self-hosted environments.

References

None

Questions

If you have any questions or comments about this advisory, please email us at [email protected]

References

@fforootd fforootd published to zitadel/zitadel Nov 29, 2023
Published to the GitHub Advisory Database Nov 29, 2023
Reviewed Nov 29, 2023
Published by the National Vulnerability Database Nov 30, 2023
Last updated Nov 30, 2023

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

EPSS score

0.087%
(38th percentile)

Weaknesses

CVE ID

CVE-2023-49097

GHSA ID

GHSA-2wmj-46rj-qm2w

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.