Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2026-3635

Опубликовано: 23 мар. 2026
Источник: redhat
CVSS3: 6.1

Описание

Summary When trustProxy is configured with a restrictive trust function (e.g., a specific IP like trustProxy: '10.0.0.1', a subnet, a hop count, or a custom function), the request.protocol and request.host getters read X-Forwarded-Proto and X-Forwarded-Host headers from any connection — including connections from untrusted IPs. This allows an attacker connecting directly to Fastify (bypassing the proxy) to spoof both the protocol and host seen by the application. Affected Versions fastify <= 5.8.2 Impact Applications using request.protocol or request.host for security decisions (HTTPS enforcement, secure cookie flags, CSRF origin checks, URL construction, host-based routing) are affected when trustProxy is configured with a restrictive trust function. When trustProxy: true (trust everything), both host and protocol trust all forwarded headers — this is expected behavior. The vulnerability only manifests with restrictive trust configurations.

A flaw was found in fastify. When the trustProxy option is configured with a restrictive trust function, such as a specific IP, a subnet, a hop count or a custom function, the request.protocol and request.host getters read X-Forwarded-Proto and X-Forwarded-Host headers from any connection, including connections from untrusted IPs. This allows an attacker connecting directly to the server, bypassing the proxy, to spoof both the protocol and host seen by the application.

Отчет

This vulnerability is only exploitable by applications using the trustProxy option with a restrictive trust function and only when the request.protocol or request.host getters are used for security decisions, such as HTTPS enforcement, secure cookie flags, CSRF origin checks, URL construction or host-based routing. Also, to exploit this issue, an attacker needs to bypass the proxy entirely and connect directly to the Fastify application port, limiting the exposure of this flaw. Due to these reasons, this vulnerability has been rated with a moderate severity.

Меры по смягчению последствий

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Enterprise Linux AI (RHEL AI) 3rhelai3/bootc-cuda-rhel9Fix deferred
Red Hat Enterprise Linux AI (RHEL AI) 3rhelai3/bootc-rocm-rhel9Fix deferred
Red Hat Enterprise Linux AI (RHEL AI) 3rhelai3/disk-image-cuda-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-dashboard-rhel8Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-dashboard-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-mod-arch-gen-ai-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-mod-arch-maas-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-mod-arch-model-registry-rhel9Fix deferred
Red Hat OpenShift Dev Spacesdevspaces/dashboard-rhel9Fix deferred

Показывать по

Дополнительная информация

Статус:

Moderate
Дефект:
CWE-348
https://bugzilla.redhat.com/show_bug.cgi?id=2450330fastify: request.protocol and request.host spoofable via X-Forwarded-Proto/Host from untrusted connections when trustProxy uses restrictive trust function

6.1 Medium

CVSS3

Связанные уязвимости

CVSS3: 6.1
nvd
5 месяцев назад

Summary When trustProxy is configured with a restrictive trust function (e.g., a specific IP like trustProxy: '10.0.0.1', a subnet, a hop count, or a custom function), the request.protocol and request.host getters read X-Forwarded-Proto and X-Forwarded-Host headers from any connection — including connections from untrusted IPs. This allows an attacker connecting directly to Fastify (bypassing the proxy) to spoof both the protocol and host seen by the application. Affected Versions fastify <= 5.8.2 Impact Applications using request.protocol or request.host for security decisions (HTTPS enforcement, secure cookie flags, CSRF origin checks, URL construction, host-based routing) are affected when trustProxy is configured with a restrictive trust function. When trustProxy: true (trust everything), both host and protocol trust all forwarded headers — this is expected behavior. The vulnerability only manifests with restrictive trust configurations.

CVSS3: 6.1
github
5 месяцев назад

fastify: request.protocol and request.host Spoofable via X-Forwarded-Proto/Host from Untrusted Connections

6.1 Medium

CVSS3