CVE-2026-3635: Fastify request.protocol and request.host spoofable via X-Forwarded-Proto/Host from untrusted connections when trustProxy uses restrictive trust function
Vulnerability summary
CVE-2026-3635 is a medium (CVSS 6.1) Use of Less Trusted Source vulnerability in fastify. EPSS estimates a 0.17% chance of exploitation in the next 30 days, higher than 6.2% of scored vulnerabilities.
Not severe (CVSS 6.1, adjacent network); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 23-03-2026PublishedVulnerability first disclosed.
- 23-03-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
4 scores · 4 sources · 1 version- OSV · NpmEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
- NVDNIST6.1MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
- OSV · ChainguardEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
EPSS trend
Probability
0.17%
Chance of exploitation in the next 30 days
Percentile
6%
Versus all other CVEs
30-day change
Increase +0.01 pp
From 0.16% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: adjacent network, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard2 products
- postgres-metaAll versions (No fix recorded)
- postgres-meta-fipsAll versions (No fix recorded)
Fastify1 product
- fastify≤ 5.8.2 | < 5.8.3
Npm1 product
- fastify< 5.8.3
3 vendors · 4 products
References
7 links- github.com/fastify/fastifyPACKAGE