{"id":"CVE-2026-16732","aliases":["GHSA-3m5p-2c4r-xxw2"],"summary":"fastify vulnerable to X-Forwarded-* spoofing under trustProxy hop-count","published_at":"2026-08-18T20:30:22.592Z","modified_at":"2026-09-24T14:03:39Z","products":[],"rating":{"severity":"medium","score":6.1,"vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","attack_path":"adjacent","user_interaction":false,"malicious":false,"red_hat":"Moderate","vendor_ratings":[{"source":"Red Hat","rating":"Moderate"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.0015800000401213765,"percentile":0.0502999983727932,"date":"2026-11-19T00:00:00Z"},"priority":6.1,"details":"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.","affected_stack":[],"affected_other":[{"ecosystem":"CVE","package":"fastify/fastify","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.8.3"},{"fixed":"5.12.1"}]}],"fixed":["5.12.1"],"provider":"cvelistv5","source":"CVE-2026-16732","relation":"self"},{"ecosystem":"NVD","package":"fastify:fastify","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.8.3"},{"fixed":"5.12.1"}]}],"fixed":["5.12.1"],"provider":"nvd","source":"CVE-2026-16732","relation":"self"},{"ecosystem":"TuxCare:npm","package":"fastify","purl":"pkg:npm/fastify","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.11.3-tuxcare.0"},{"fixed":"5.11.3-tuxcare.1"}]}],"versions":["5.11.3"],"fixed":["5.11.3-tuxcare.1"],"provider":"osv","source":"CLSA-2026-1788457323","relation":"upstream"},{"ecosystem":"TuxCare:npm","package":"fastify","purl":"pkg:npm/fastify","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.12.0-tuxcare.0"},{"fixed":"5.12.0-tuxcare.1"}]}],"versions":["5.12.0"],"fixed":["5.12.0-tuxcare.1"],"provider":"osv","source":"CLSA-2026-1789896330","relation":"upstream"},{"ecosystem":"npm","package":"fastify","purl":"pkg:npm/fastify","ranges":[{"type":"SEMVER","events":[{"introduced":"5.8.3"},{"fixed":"5.12.1"}]}],"fixed":["5.12.1"],"provider":"osv","source":"GHSA-3m5p-2c4r-xxw2","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Red Hat Enterprise Linux AI (RHEL AI) 3","cpe":"cpe:/a:redhat:enterprise_linux_ai:3","status":"not_affected","packages":["rhelai3/bootc-cuda-rhel9","rhelai3/bootc-gaudi-rhel9","rhelai3/bootc-rocm-rhel9","rhelai3/disk-image-cuda-rhel9"],"package_count":4,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-16732"},{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","cpe":"cpe:/a:redhat:openshift_ai","status":"not_affected","packages":["rhoai/odh-core-bff-rhel9","rhoai/odh-dashboard-operator-rhel9","rhoai/odh-dashboard-rhel9","rhoai/odh-mod-arch-agent-ops-rhel9","rhoai/odh-mod-arch-automl-rhel9","rhoai/odh-mod-arch-autorag-rhel9","rhoai/odh-mod-arch-eval-hub-rhel9","rhoai/odh-mod-arch-gen-ai-rhel9","rhoai/odh-mod-arch-maas-rhel9","rhoai/odh-mod-arch-mlflow-rhel9","rhoai/odh-mod-arch-model-registry-rhel9"],"package_count":11,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-16732"},{"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces","cpe":"cpe:/a:redhat:openshift_devspaces:3","status":"affected","packages":["devspaces/dashboard-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-16732"}],"records":[{"provider":"osv","source_id":"CLSA-2026-1788457323","relation":"upstream","url":"https://osv.dev/vulnerability/CLSA-2026-1788457323","published_at":"2026-09-03T17:42:03Z","modified_at":"2026-10-15T09:48:03.108286Z","summary":"TuxCare security update for fastify (2 CVEs)","details":"TuxCare rebuilt fastify to address 2 CVEs. Fixed in 5.11.3-tuxcare.1.","severity":[],"affected":[{"ecosystem":"TuxCare:npm","package":"fastify","purl":"pkg:npm/fastify","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.11.3-tuxcare.0"},{"fixed":"5.11.3-tuxcare.1"}]}],"versions":["5.11.3"],"fixed":["5.11.3-tuxcare.1"],"provider":"osv","source":"CLSA-2026-1788457323","relation":"upstream"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"CLSA-2026-1789896330","relation":"upstream","url":"https://osv.dev/vulnerability/CLSA-2026-1789896330","published_at":"2026-09-20T09:25:30Z","modified_at":"2026-10-15T09:47:56.251234Z","summary":"TuxCare security update for fastify (2 CVEs)","details":"TuxCare rebuilt fastify to address 2 CVEs. Fixed in 5.12.0-tuxcare.1.","severity":[],"affected":[{"ecosystem":"TuxCare:npm","package":"fastify","purl":"pkg:npm/fastify","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.12.0-tuxcare.0"},{"fixed":"5.12.0-tuxcare.1"}]}],"versions":["5.12.0"],"fixed":["5.12.0-tuxcare.1"],"provider":"osv","source":"CLSA-2026-1789896330","relation":"upstream"}],"product_status":[],"references":[]},{"provider":"cvelistv5","source_id":"CVE-2026-16732","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2026-16732","license":"CC-BY-4.0","published_at":"2026-08-18T20:30:22.592Z","modified_at":"2026-08-19T13:16:06.497Z","summary":"fastify vulnerable to X-Forwarded-* spoofing under trustProxy hop-count","details":"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.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","source":"CVE-2026-16732"}],"affected":[{"ecosystem":"CVE","package":"fastify/fastify","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.8.3"},{"fixed":"5.12.1"}]}],"fixed":["5.12.1"],"provider":"cvelistv5","source":"CVE-2026-16732","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/fastify/fastify/security/advisories/GHSA-3m5p-2c4r-xxw2"},{"type":"WEB","url":"https://cna.openjsf.org/security-advisories.html"}]},{"provider":"nvd","source_id":"CVE-2026-16732","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-16732","severity":[],"affected":[{"ecosystem":"NVD","package":"fastify:fastify","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.8.3"},{"fixed":"5.12.1"}]}],"fixed":["5.12.1"],"provider":"nvd","source":"CVE-2026-16732","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"GHSA-3m5p-2c4r-xxw2","relation":"self","url":"https://osv.dev/vulnerability/GHSA-3m5p-2c4r-xxw2","license":"CC-BY-4.0","published_at":"2026-09-02T15:14:06Z","modified_at":"2026-09-02T15:30:17.627342Z","summary":"fastify vulnerable to X-Forwarded-* spoofing under trustProxy hop-count","details":"## Impact\n\nThe fix for [CVE-2026-3635](https://www.cve.org/CVERecord?id=CVE-2026-3635) ([GHSA-444r-cwp2-x5xf](https://github.com/fastify/fastify/security/advisories/GHSA-444r-cwp2-x5xf)) added a `proxyFn(socket.remoteAddress, 0)` guard on the `X-Forwarded-*` reads in `request.host`, `request.protocol`, `request.hostname`, `request.ip`, and `request.ips`. 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 (`trustProxy: <number>`) compiles to a predicate that structurally ignores the address argument, so the guard reduces to `0 < tp`, always true for any `tp >= 1`.\n\nApplications configured with `trustProxy: <number>` (documented as \"behind N reverse proxies\", `trustProxy: 1` being the canonical single-proxy setting) remain vulnerable. An attacker who can reach the Fastify origin directly, bypassing the front-facing proxy, can spoof the request fields exactly as in the unpatched version. Impact class matches the parent CVE-2026-3635: host injection in generated URLs, HTTPS-enforcement bypass, secure-cookie / CSRF-origin bypass, host-based routing and cache poisoning.\n\n## Patches\n\nPatched in fastify 5.12.1. The numeric form of `trustProxy` is now disabled at runtime and removed from the TypeScript type union.\n\n## Workarounds\n\n- Migrate to an IP / CIDR / custom-function `trustProxy` value that validates the connecting address. Custom functions must inspect the `address` argument, not only the hop index.\n- Ensure the Fastify origin is only reachable through the trusted proxy chain (no direct network path).","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","source":"GHSA-3m5p-2c4r-xxw2"}],"affected":[{"ecosystem":"npm","package":"fastify","purl":"pkg:npm/fastify","ranges":[{"type":"SEMVER","events":[{"introduced":"5.8.3"},{"fixed":"5.12.1"}]}],"fixed":["5.12.1"],"provider":"osv","source":"GHSA-3m5p-2c4r-xxw2","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/fastify/fastify/security/advisories/GHSA-3m5p-2c4r-xxw2"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-16732"},{"type":"WEB","url":"https://github.com/fastify/fastify/commit/8acfea7eada05383a7357e3eb21c2628416df280"},{"type":"WEB","url":"https://cna.openjsf.org/security-advisories.html"},{"type":"PACKAGE","url":"https://github.com/fastify/fastify"},{"type":"WEB","url":"https://github.com/fastify/fastify/releases/tag/v5.12.1"}]},{"provider":"redhat-vex","source_id":"CVE-2026-16732","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2026-16732","license":"CC-BY-4.0","published_at":"2026-08-18T20:30:22.592Z","modified_at":"2026-09-24T14:03:39Z","summary":"fastify: fastify: Request spoofing via numeric trustProxy configuration","details":"A flaw was found in fastify. When configured with a numeric `trustProxy` value, an attacker who can directly access the Fastify origin, bypassing the front-facing proxy, can spoof forwarded request fields. This vulnerability allows for host injection in generated URLs, bypasses HTTPS enforcement, and can lead to secure-cookie and Cross-Site Request Forgery (CSRF) origin bypasses, as well as host-based routing and cache poisoning.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","source":"CVE-2026-16732"},{"type":"Red Hat","score":"Moderate","source":"CVE-2026-16732"}],"affected":[],"product_status":[{"vendor":"Red Hat","product":"Red Hat Enterprise Linux AI (RHEL AI) 3","cpe":"cpe:/a:redhat:enterprise_linux_ai:3","status":"not_affected","packages":["rhelai3/bootc-cuda-rhel9","rhelai3/bootc-gaudi-rhel9","rhelai3/bootc-rocm-rhel9","rhelai3/disk-image-cuda-rhel9"],"package_count":4,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-16732"},{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","cpe":"cpe:/a:redhat:openshift_ai","status":"not_affected","packages":["rhoai/odh-core-bff-rhel9","rhoai/odh-dashboard-operator-rhel9","rhoai/odh-dashboard-rhel9","rhoai/odh-mod-arch-agent-ops-rhel9","rhoai/odh-mod-arch-automl-rhel9","rhoai/odh-mod-arch-autorag-rhel9","rhoai/odh-mod-arch-eval-hub-rhel9","rhoai/odh-mod-arch-gen-ai-rhel9","rhoai/odh-mod-arch-maas-rhel9","rhoai/odh-mod-arch-mlflow-rhel9","rhoai/odh-mod-arch-model-registry-rhel9"],"package_count":11,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-16732"},{"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces","cpe":"cpe:/a:redhat:openshift_devspaces:3","status":"affected","packages":["devspaces/dashboard-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-16732"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-16732.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-16732"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2518255"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2026-16732"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-16732"},{"type":"WEB","url":"https://cna.openjsf.org/security-advisories.html"},{"type":"WEB","url":"https://github.com/fastify/fastify/security/advisories/GHSA-3m5p-2c4r-xxw2"}]}],"references":[{"type":"WEB","url":"https://github.com/fastify/fastify/security/advisories/GHSA-3m5p-2c4r-xxw2"},{"type":"WEB","url":"https://cna.openjsf.org/security-advisories.html"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-16732"},{"type":"WEB","url":"https://github.com/fastify/fastify/commit/8acfea7eada05383a7357e3eb21c2628416df280"},{"type":"PACKAGE","url":"https://github.com/fastify/fastify"},{"type":"WEB","url":"https://github.com/fastify/fastify/releases/tag/v5.12.1"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-16732.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-16732"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2518255"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2026-16732"}],"sources":[{"provider":"osv","source_id":"CLSA-2026-1788457323","url":"https://osv.dev/vulnerability/CLSA-2026-1788457323","modified_at":"2026-10-15T09:48:03.108286Z","relation":"upstream"},{"provider":"osv","source_id":"CLSA-2026-1789896330","url":"https://osv.dev/vulnerability/CLSA-2026-1789896330","modified_at":"2026-10-15T09:47:56.251234Z","relation":"upstream"},{"provider":"cvelistv5","source_id":"CVE-2026-16732","url":"https://www.cve.org/CVERecord?id=CVE-2026-16732","license":"CC-BY-4.0","modified_at":"2026-08-19T13:16:06.497Z","relation":"self"},{"provider":"nvd","source_id":"CVE-2026-16732","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-16732","relation":"self"},{"provider":"osv","source_id":"GHSA-3m5p-2c4r-xxw2","url":"https://osv.dev/vulnerability/GHSA-3m5p-2c4r-xxw2","license":"CC-BY-4.0","modified_at":"2026-09-02T15:30:17.627342Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2026-16732","url":"https://access.redhat.com/security/cve/CVE-2026-16732","license":"CC-BY-4.0","modified_at":"2026-09-24T14:03:39Z","relation":"self"}]}
