Vulnerability in fastify (CVE-2026-16732)
Summary
Vulnerability in fastify (CVE-2026-16732). Confidential information can be exposed externally. Exploitable via request.host. Mitigation: upgrade to 5.12.1 or later.
Original description
The description as published by the source.
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.
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-16732 has been found in fastify.
Attackers can target a specific entry point like request.host over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 6.1/10.
What to do: upgrade fastify to 5.12.1 or later.
If unsure, ask your IT team or search "fastify CVE-2026-16732" on the vendor's site.
CVE-2026-16732 (fastify) — CWE-348 / CVSS v3 6.1
Attack vector: adjacent-network / unauthenticated / no user interaction
Attack surface: request.host / request.protocol / request.hostname / request.ip
Patched: 5.12.1 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-348) exists in fastify. Attackers reach the vulnerable code path via request.host without authentication.
Check the vendor advisory for the affected versions of fastify. Attack surface: request.host / request.protocol / request.hostname / request.ip.
Severity: Medium (CVSS 6.1/10). Confidential information can be exposed externally.
Update to 5.12.1.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'fastify' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'fastify' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
fastifyを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade fastify to 5.12.1ステージング環境で 5.12.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory cna.openjsf.org
- advisory github.com
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- web github.com
- web github.com
- web github.com