CVE-2026-16732
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 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.
INFO
Published Date :
Aug. 18, 2026, 9:16 p.m.
Last Modified :
Aug. 19, 2026, 2:17 p.m.
Remotely Exploit :
No
Source :
ce714d77-add3-4f53-aff5-83d477b104bb
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | MEDIUM | ce714d77-add3-4f53-aff5-83d477b104bb | ||||
| CVSS 3.1 | MEDIUM | MITRE-CVE |
Solution
- Update Fastify to version 5.12.1.
- Configure trustProxy using IP, CIDR, or custom functions.
- Ensure origin is only reachable via trusted proxy.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-16732.
| URL | Resource |
|---|---|
| https://cna.openjsf.org/security-advisories.html | |
| https://github.com/fastify/fastify/security/advisories/GHSA-3m5p-2c4r-xxw2 |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-16732 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-16732
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-16732 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-16732 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Aug. 19, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-16732', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-08-19T13:15:46.091425Z'} -
New CVE Received by ce714d77-add3-4f53-aff5-83d477b104bb
Aug. 18, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'fastify', 'product': 'fastify', 'versions': [{'status': 'affected', 'version': '5.8.3', 'lessThan': '5.12.1', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '5.12.1', 'versionType': 'semver'}], 'packageURL': 'pkg:npm/fastify', 'defaultStatus': 'unaffected'}] Added 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 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. Added CVSS V3.1 AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N Added CWE CWE-348 Added Reference https://cna.openjsf.org/security-advisories.html Added Reference https://github.com/fastify/fastify/security/advisories/GHSA-3m5p-2c4r-xxw2