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

- Priority: **Routine**
- Reason: Not severe (CVSS 6.1, adjacent network); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-03-23 · Modified: 2026-03-23
- Aliases: GHSA-444r-cwp2-x5xf, CGA-mmcc-5xgm-j274, CGA-x9jw-57hj-rv54, CGA-6wjw-7fh4-cg7p, CGA-pwvc-4xj8-j245
- Record: https://cvemate.com/vulnerability/CVE-2026-3635 · JSON: https://cvemate.com/vulnerability/CVE-2026-3635/json

## Description

```text
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.
```

## Signals

- CVSS: 6.1 medium (v3.1, CVE.org) CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
- EPSS: 0.167%, percentile 6.205%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- chainguard postgres-meta (Chainguard): All versions (No fix recorded)
- chainguard postgres-meta-fips (Chainguard): All versions (No fix recorded)
- fastify fastify: ≤ 5.8.2 \| \< 5.8.3
- Npm fastify (Npm): \< 5.8.3

## References

- <https://github.com/fastify/fastify/security/advisories/GHSA-444r-cwp2-x5xf>
- <https://www.cve.org/CVERecord?id=CVE-2026-3635>
- <https://cna.openjsf.org/security-advisories.html>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-3635>
- <https://github.com/fastify/fastify>
- <https://github.com/fastify/fastify/releases/tag/v5.8.3>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/3xxx/CVE-2026-3635.json>

---

Data as of 2026-12-05T09:21:38.102Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
