๐Ÿ” CVE Alert

CVE-2026-3635

MEDIUM 6.1

Fastify request.protocol and request.host spoofable via X-Forwarded-Proto/Host from untrusted connections when trustProxy uses restrictive trust function

CVSS Score
6.1
EPSS Score
0.0%
EPSS Percentile
0th

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.

CWE CWE-348
Vendor fastify
Product fastify
Published Mar 23, 2026
Last Updated Mar 23, 2026
Stay Ahead of the Next One

Get instant alerts for fastify fastify

Be the first to know when new medium vulnerabilities affecting fastify fastify are published โ€” delivered to Slack, Telegram or Discord.

Get Free Alerts โ†’ Free ยท No credit card ยท 60 sec setup

CVSS v3 Breakdown

CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
Attack Vector
Adjacent
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

Affected Versions

fastify / fastify
0 โ‰ค 5.8.2

References

NVD โ†— CVE.org โ†— EPSS Data โ†—
github.com: https://github.com/fastify/fastify/security/advisories/GHSA-444r-cwp2-x5xf cve.org: https://www.cve.org/CVERecord?id=CVE-2026-3635 cna.openjsf.org: https://cna.openjsf.org/security-advisories.html

Credits

๐Ÿ” LetaoZhao (TinkAnet) KaKa (climba03003) Matteo Collina Ulises Gascรณn