CVE-2026-3635

Description

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.

Statement

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

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.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score6.1N/AN/A
Attack VectorAdjacent NetworkN/AN/A
Attack ComplexityHighN/AN/A
Privileges RequiredNoneN/AN/A
User InteractionNoneN/AN/A
ScopeChangedN/AN/A
ConfidentialityHighN/AN/A
Integrity ImpactNoneN/AN/A
Availability ImpactNoneN/AN/A

Vector

Red Hat: CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N

Understanding the Weakness (CWE)

Access Control

Technical Impact: Bypass Protection Mechanism; Gain Privileges or Assume Identity

An attacker could utilize the untrusted data source to bypass protection mechanisms and gain access to sensitive data.

Frequently Asked Questions

Want to get errata notifications? Sign up here.