Sonatype GuideSonatype Guide
ComponentsVulnerabilitiesPricingMCPAPI
Docs
Sign up
Login
npm
fastify
0.20.1

fastify 0.20.1

PublishedJun 1, 2017•Policy
compliance
npm Registry
Developer Trust Score
N/A
Recommended Version:x.y.z
Latest version with 0 known vulnerabilities that meets your policy.
Compare Versions
Severity
CVSS Score
0.010.0
EPSS Score
0.01.0
Malware
6.1CVE-2026-3635
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.
affected
SeverityMedium
PublishedMar 25, 2026