{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-3635","id":"CVE-2026-3635","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 ","descriptionLong":"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.","published":"2026-03-23T13:53:00.386Z","updated":"2026-10-28T02:31:01.125690328Z","reserved":"2026-03-06T09:16:35.081Z","status":"Analyzed","rejected":false,"assigner":"openjs","metric":{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","rating":"medium","source":"openjs"},"metrics":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","rating":"medium","source":"openjs"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","rating":"medium","source":"ce714d77-add3-4f53-aff5-83d477b104bb"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","rating":"medium","source":"GitHub"}],"rating":"medium","products":["fastify"],"affectedProducts":[{"vendor":"fastify","product":"fastify","defaultStatus":"unaffected","versions":[{"status":"affected","version":"0","lessThanOrEqual":"5.8.2","versionType":"semver"},{"status":"unaffected","version":"5.8.3","versionType":"semver"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"fastify","purl":"pkg:npm/fastify","ranges":["<5.8.3"],"fixed":["5.8.3"],"advisory":"GHSA-444r-cwp2-x5xf"}],"cwes":["CWE-348"],"aliases":["GHSA-444r-cwp2-x5xf"],"references":[{"url":"https://github.com/fastify/fastify/security/advisories/GHSA-444r-cwp2-x5xf","tags":["Vendor Advisory","advisory","web"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-3635","tags":["Third Party Advisory","web"]},{"url":"https://cna.openjsf.org/security-advisories.html","tags":["Third Party Advisory","advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/3xxx/CVE-2026-3635.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-3635","tags":["advisory"]},{"url":"https://github.com/fastify/fastify","tags":["package"]},{"url":"https://github.com/fastify/fastify/releases/tag/v5.8.3","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00167,"epssPercentile":0.06016,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-3635","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-3635","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-3635","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-444r-cwp2-x5xf","ok":true,"note":"GHSA-444r-cwp2-x5xf"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-3635","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}