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.
Published: 2026-07-29
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The flaw occurs in the @fastify/forwarded library, which resolves client addresses from the X-Forwarded-For header. In versions prior to 3.0.2, the parser trims only space characters from comma-separated entries and does not strip horizontal tabs, despite RFC 7230 allowing whitespace to include both space and tab. This means that an entry padded with a tab is stored with the literal tab character, producing a corrupted address string that no longer matches exact string‑based security controls such as allowlists, blocklists, per‑IP rate limiting keys, or audit log correlation. Because the corrupted string is not a valid IP address, it cannot be mistaken for a trusted proxy, so the vulnerability does not cross a trust boundary. However, it does enable the bypass of IP‑based security decisions that rely on precise string comparison. Based on the description, it is inferred that applications using this library for IP validation can be evaded by an attacker who injects a tab character into the X‑Forwarded‑For header.

Affected Systems

Vulnerable systems include any Node.js applications that depend on @fastify/forwarded before version 3.0.2. The fix is available in @fastify/forwarded 3.0.2 and later. No other vendors or products are explicitly affected according to the CNA data.

Risk and Exploitability

Based on the description, it is inferred that the most common attack vector involves injecting a crafted X‑Forwarded‑For header containing a tab‑augmented IP segment. The CVSS score of 5.3 indicates a moderate rating; the EPSS score of less than 1% implies a low probability of exploitation in the near term. The vulnerability is not listed in CISA KEV, further suggesting limited exploitation risk. The attack can be carried out by injecting a crafted X‑Forwarded‑For header containing a tab‑augmented IP segment, which is a trivial HTTP request modification. No local privileges or elevated permissions are required, and the attack is limited to the application level. However, because many web frameworks rely on exact IP string matches for security controls, widespread bypass could be achieved if the vulnerability goes unfixed.

Generated by OpenCVE AI on August 3, 2026 at 13:23 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the @fastify/forwarded package to version 3.0.2 or later.
  • If an upgrade is not immediately possible, remove or ignore the X‑Forwarded‑For header from incoming requests before they reach the application logic.
  • Validate the X‑Forwarded‑For header before it reaches the application, ensuring that any tab characters are stripped or rejecting malformed entries.
  • Update any IP‑based checks to normalize the address string (e.g., trim whitespace) before performing exact string comparisons.

Generated by OpenCVE AI on August 3, 2026 at 13:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 30 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
First Time appeared Fastify
Fastify fastify/forwarded
Vendors & Products Fastify
Fastify fastify/forwarded

Wed, 29 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 29 Jul 2026 14:00:00 +0000

Type Values Removed Values Added
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.
Title @fastify/forwarded vulnerable to improper input validation via unstripped tab characters in X-Forwarded-For
Weaknesses CWE-184
CWE-20
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N'}


Subscriptions

Fastify Fastify/forwarded Fastify\/forwarded
cve-icon MITRE

Status: PUBLISHED

Assigner: openjs

Published:

Updated: 2026-07-29T14:54:22.767Z

Reserved: 2026-07-28T21:45:18.437Z

Link: CVE-2026-18174

cve-icon Vulnrichment

Updated: 2026-07-29T14:53:38.845Z

cve-icon NVD

Status : Analyzed

Published: 2026-07-29T14:16:28.790

Modified: 2026-08-05T15:34:17.960

Link: CVE-2026-18174

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T13:30:04Z

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-20

    Improper Input Validation