CVE-2026-3635
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedSummary 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceIn Fastify versions <= 5.8.2, when trustProxy is configured with a restrictive trust function (specific IP, subnet, hop count, or custom function), the request.protocol and request.host getters incorrectly accept X-Forwarded-Proto and X-Forwarded-Host headers from ANY connection, including direct connections from untrusted IPs. This allows attackers bypassing the proxy to spoof protocol and host values used for security decisions.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data< 5.8.3CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Adjacent
- Complexity
- High
- Privileges
- None
- User interaction
- None
- Scope
- Changed
- Confidentiality
- High
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check installed Fastify versionRun 'npm list fastify' or check package.json to find the installed version numberAffected if The installed version is 5.8.2 or lower (any version < 5.8.3)
-
Verify trustProxy configurationSearch your Fastify server initialization code for 'trustProxy' option and inspect its valueAffected if trustProxy is configured with any value other than true (including specific IP addresses, subnet CIDRs, numeric hop counts, or a custom function)
-
Identify code using request.protocolSearch codebase for 'request.protocol' or 'req.protocol' usage in route handlers and middlewareAffected if Code reads request.protocol for security decisions such as HTTPS enforcement, secure cookie settings, or conditional logic based on connection protocol
-
Identify code using request.hostSearch codebase for 'request.host', 'request.hostname', 'req.host', or 'req.hostname' usage in route handlers and middlewareAffected if Code reads request.host or request.hostname for security decisions such as CSRF validation, URL construction, or host-based access control
You are affected if Fastify version is < 5.8.3 AND trustProxy is configured AND your code uses request.protocol or request.host for security-sensitive operations.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped5.8.3
Review all code using request.protocol and request.host for security purposes (HTTPS enforcement, secure cookies, CSRF checks, URL construction, host-based routing) and implement application-level validation; wait for Fastify patch and upgrade when available.
- Run `npm install [email protected]` to upgrade to the patched version
- Alternatively, use `npm install fastify@latest` to get the latest stable release which includes the fix
- After upgrading, verify your application works correctly with `npm test` or your existing test suite
- Deploy the updated version to your production environment
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation8.0 h
- Testing6.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,600.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-3635 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-3635 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data