CVE-2026-3635 Details
Description
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 vulnerability exists in Fastify versions through 5.8.2 when the trustProxy setting is configured with a restrictive trust function. In this scenario, the request.protocol and request.host getters can be manipulated to read the X-Forwarded-Proto and X-Forwarded-Host headers from untrusted connections. This exploitation allows an attacker to spoof the protocol and host information seen by the application, potentially bypassing security measures that rely on these headers.
Users can upgrade to Fastify version 5.8.3 or later to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 23, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://cna.openjsf.org/security-advisories.html | openjs | Third Party Advisory |
| https://github.com/fastify/fastify/security/advisories/GHSA-444r-cwp2-x5xf | openjs | Vendor Advisory |
| https://www.cve.org/CVERecord?id=CVE-2026-3635 | openjs | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-348 | Use of Less Trusted Source | openjs |
Affected Products
| Product | Versions |
|---|---|
| fastify fastify | < 5.8.3 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | openjs |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 16, 2026 | Initial Analysis | [email protected] |
| Mar 23, 2026 | New CVE Received | openjs |