{"schemaVersion":4,"id":"CVE-2026-3635","aliases":["GHSA-444r-cwp2-x5xf","CGA-mmcc-5xgm-j274","CGA-x9jw-57hj-rv54","CGA-6wjw-7fh4-cg7p","CGA-pwvc-4xj8-j245"],"status":"published","duplicateOf":null,"title":"Fastify request.protocol and request.host spoofable via X-Forwarded-Proto/Host from untrusted connections when trustProxy uses restrictive trust function","description":"Summary\nWhen 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.\n\nAffected Versions\nfastify <= 5.8.2\n\nImpact\nApplications 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.\n\nWhen trustProxy: true (trust everything), both host and protocol trust all forwarded headers — this is expected behavior. The vulnerability only manifests with restrictive trust configurations.","dates":{"published":"2026-03-23T13:53:00.386Z","modified":"2026-03-23T15:30:10.526Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":6.1,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","exploitability":4.1,"impact":6.7,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Chainguard","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","exploitability":4.1,"impact":6.7,"computed":true}]},"epss":{"probability":0.00167,"percentile":0.06205,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":0.005999999999999994,"baselineDate":"2026-11-04T00:00:00.000Z","baselineScore":0.00161},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.0012,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.0012,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.0012,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.0012,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.0012,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.0012,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.0012,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.0012,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.0012,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.0012,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00168,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00176,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00176,"percentile":null},{"date":"2026-10-22T00:00:00.000Z","score":0.00176,"percentile":null},{"date":"2026-10-23T00:00:00.000Z","score":0.00176,"percentile":null},{"date":"2026-10-24T00:00:00.000Z","score":0.00176,"percentile":null},{"date":"2026-10-25T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-10-26T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-10-27T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-10-28T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-10-29T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-10-30T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-10-31T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-11-01T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-11-02T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-11-03T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-11-04T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00187,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00187,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00187,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00187,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00187,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00187,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00167,"percentile":0.06205}],"last30":[{"date":"2026-11-04T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.00161,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.00153,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00187,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00187,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00187,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00187,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00187,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00187,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00167,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00167,"percentile":0.06205}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-348","name":"Use of Less Trusted Source","description":"The product has two different sources of the same data or information, but it uses the source that has less support for verification, is less trusted, or is less resistant to attack.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/348.html"}],"affected":[{"vendor":"chainguard","product":"postgres-meta","name":"postgres-meta","label":"postgres-meta","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/postgres-meta","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null,"bounds":{"kind":"all"}}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"chainguard","product":"postgres-meta-fips","name":"postgres-meta-fips","label":"postgres-meta-fips","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/postgres-meta-fips","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null,"bounds":{"kind":"all"}}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"fastify","product":"fastify","name":"fastify","label":"fastify","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 5.8.2","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"5.8.2","endInclusive":true}},{"text":"< 5.8.3","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"5.8.3","endInclusive":false}}],"versionsText":"≤ 5.8.2 | < 5.8.3","eol":null,"hubHref":"/vendor/fastify/fastify"},{"vendor":"Npm","product":"fastify","name":"fastify","label":"fastify","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/fastify","purlType":"npm","versions":[{"text":"< 5.8.3","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"5.8.3","endInclusive":false}}],"versionsText":"< 5.8.3","eol":null,"hubHref":null}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/fastify/fastify/security/advisories/GHSA-444r-cwp2-x5xf","label":"github.com/fastify/fastify/security/advisories/GHSA-444r-cwp2-x5xf","hostname":"github.com","tags":["WEB","Vendor Advisory","Advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-3635","label":"www.cve.org/CVERecord?id=CVE-2026-3635","hostname":"www.cve.org","tags":["WEB","Third Party Advisory"]},{"url":"https://cna.openjsf.org/security-advisories.html","label":"cna.openjsf.org/security-advisories.html","hostname":"cna.openjsf.org","tags":["WEB","Third Party Advisory","Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-3635","label":"nvd.nist.gov/vuln/detail/CVE-2026-3635","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/fastify/fastify","label":"github.com/fastify/fastify","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/fastify/fastify/releases/tag/v5.8.3","label":"github.com/fastify/fastify/releases/tag/v5.8.3","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/3xxx/CVE-2026-3635.json","label":"github.com/CVEProject/cvelistV5/tree/main/cves/2026/3xxx/CVE-2026-3635.json","hostname":"github.com","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-03-23T13:53:00.386Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-03-23T15:30:10.526Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"routine","tag":null,"reason":"Not severe (CVSS 6.1, adjacent network); no exploitation reported by the 5 checked sources","nextStep":"Fix in the normal cadence","rank":[0,0,0,0,0,61],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.00167,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2026-03-23T15:30:10.526Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.1,"vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","version":"3.1","headline":true},{"type":"cvss","source":"osv_npm","date":"2026-03-23T15:30:10.526Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.1,"vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","version":"3.1"},{"type":"cvss","source":"nvd","date":"2026-03-23T15:30:10.526Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.1,"vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","version":"3.1"},{"type":"cvss","source":"osv_chainguard","date":"2026-03-23T15:30:10.526Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.1,"vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","version":"3.1"},{"type":"adp","source":"cisa-adp","date":"2026-03-23T15:29:15.532Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"exploitation":"none"}],"epss":{"value":0.00167,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T09:01:26.874Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T09:01:27.430Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T09:01:27.610Z","state":"fresh"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T09:01:02.756Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T09:01:25.188Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T09:01:24.136Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T09:21:38.102Z","stale":false,"partial":false}}