CVE-2026-18174 Details
Description
@fastify/forwarded resolves client addresses from the X-Forwarded-For header. In versions before 3.0.2, when the header contains two or more comma separated entries, the parser trims only space characters and does not strip horizontal tabs, even though RFC 7230 defines optional whitespace as both space and tab. As a result, an entry padded with a tab keeps the literal tab in the resolved address string. Applications that make exact string match security decisions on the resolved client IP, such as an allowlist, a blocklist, a per IP rate limit key, or audit log correlation, can be evaded because the tab corrupted string no longer matches the expected value. This does not cross the trust boundary, since a tab corrupted string is not a valid IP and cannot be mistaken for a trusted proxy. The issue is fixed in @fastify/forwarded 3.0.2.
A vulnerability exists in @fastify/forwarded versions prior to 3.0.2, where the parser of the X-Forwarded-For header fails to properly remove horizontal tab characters. This issue arises because the parser only trims space characters, neglecting tabs, even though RFC 7230 considers both as optional whitespace. Consequently, an entry with a tab can retain the tab in the resolved address, leading to evasion of security measures that rely on exact string matches of client IPs. This vulnerability does not cross the trust boundary, as a tab-altered string cannot be interpreted as a valid IP or a trusted proxy.
Users are advised to upgrade to @fastify/forwarded version 3.0.2 or later. If an immediate upgrade is not possible, normalize the resolved address by removing tabs and spaces before any exact-match comparison, or reject requests with tab-included X-Forwarded-For headers using an onRequest hook.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 29, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://cna.openjsf.org/security-advisories.html | openjs | Vendor Advisory |
| https://github.com/fastify/forwarded/security/advisories/GHSA-2849-m2w7-xm8f | openjs | Vendor AdvisoryMitigation |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-184 | Incomplete List of Disallowed Inputs | openjs |
| CWE-20 | Improper Input Validation | openjs |
Affected Products
| Product | Versions |
|---|---|
| fastify fastify/forwarded | < 3.0.2 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 5, 2026 | Initial Analysis | [email protected] |
| Jul 29, 2026 | CVE Modified | CISA-ADP |
| Jul 29, 2026 | New CVE Received | openjs |