{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-16732","id":"CVE-2026-16732","title":"fastify vulnerable to X-Forwarded-* spoofing under trustProxy hop-count","description":"fastify is a fast and low overhead web framework for Node.js. Impact: the fix for CVE-2026-3635 added a guard on the forwarded-header reads used to derive the request host, protocol, hostname, ip, and ips values, checking the connecting address. That guard closes the IP, CIDR, and custom-function forms of trustProxy correctly, because those forms compile to predicates that inspect the connecting a","descriptionLong":"fastify is a fast and low overhead web framework for Node.js. Impact: the fix for CVE-2026-3635 added a guard on the forwarded-header reads used to derive the request host, protocol, hostname, ip, and ips values, checking the connecting address. That guard closes the IP, CIDR, and custom-function forms of trustProxy correctly, because those forms compile to predicates that inspect the connecting address. The hop-count form, where trustProxy is set to a number, compiles to a predicate that structurally ignores the address, so the guard is always satisfied for any hop count of one or more. Applications configured with a numeric trustProxy value, such as trustProxy set to 1 for a single reverse proxy, remain vulnerable: an attacker who can reach the Fastify origin directly, bypassing the front-facing proxy, can spoof the forwarded request fields exactly as in the unpatched version. The impact class matches the parent CVE-2026-3635, including host injection in generated URLs, HTTPS-enforcement bypass, secure-cookie and CSRF-origin bypass, and host-based routing and cache poisoning. Affected versions are fastify from 5.8.3 up to but not including 5.12.1. Patches: patched in fastify 5.12.1, where the numeric form of trustProxy is disabled at runtime and removed from the TypeScript type union. Workarounds: migrate to an IP, CIDR, or custom-function trustProxy value that validates the connecting address, and ensure the Fastify origin is only reachable through the trusted proxy chain.","published":"2026-08-18T20:30:22.592Z","updated":"2026-10-28T02:31:03.669873120Z","reserved":"2026-07-23T07:30:53.415Z","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":[{"versionType":"semver","status":"affected","version":"5.8.3","lessThan":"5.12.1"},{"versionType":"semver","status":"unaffected","version":"5.12.1"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"fastify","purl":"pkg:npm/fastify","ranges":[">=5.8.3 <5.12.1"],"fixed":["5.12.1"],"advisory":"GHSA-3m5p-2c4r-xxw2"}],"cwes":["CWE-348"],"aliases":["GHSA-3m5p-2c4r-xxw2"],"references":[{"url":"https://github.com/fastify/fastify/security/advisories/GHSA-3m5p-2c4r-xxw2","tags":["Mitigation","Vendor Advisory","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/16xxx/CVE-2026-16732.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-16732","tags":["advisory"]},{"url":"https://github.com/fastify/fastify/commit/8acfea7eada05383a7357e3eb21c2628416df280","tags":["web"]},{"url":"https://github.com/fastify/fastify","tags":["package"]},{"url":"https://github.com/fastify/fastify/releases/tag/v5.12.1","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.00158,"epssPercentile":0.04997,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-16732","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-16732","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-16732","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-3m5p-2c4r-xxw2","ok":true,"note":"GHSA-3m5p-2c4r-xxw2"},{"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-16732","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}