CVE-2026-18174 @fastify/forwarded vulnerable to improper input validation via unstripped tab characters in X-Forwarded-For
Attackers can bypass IP-based security controls like allowlists or rate limits by injecting tab characters into the X-Forwarded-For header.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-18174?
CVE-2026-18174 is a medium-severity vulnerability in @fastify/forwarded, published on 29 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Which versions are affected by CVE-2026-18174?
It affects 1 product.
Products include Fastify Fastify\/Forwarded.
How do I fix CVE-2026-18174?
No fix has been published for CVE-2026-18174 yet. Limit exposure of the affected software until one is available.
Is CVE-2026-18174 being exploited?
There is no known exploitation of CVE-2026-18174 in the wild and no public exploit code.
Sources
Also known as GHSA-2849-m2w7-xm8f.