@fastify/forwarded vulnerable to improper input validation via unstripped tab characters in X-Forwarded-For

Summary

CVECVE-2026-18174
StatePUBLISHED
Assigneropenjs
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-07-29 14:16:28 UTC
Updated2026-08-05 15:34:17 UTC
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.

Risk And Classification

Primary CVSS: v3.1 5.3 MEDIUM from ce714d77-add3-4f53-aff5-83d477b104bb

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

EPSS: 0.001930000 probability, percentile 0.091800000 (date 2026-08-05)

Problem Types: CWE-20 | CWE-184 | CWE-20 CWE-20: Improper Input Validation | CWE-184 CWE-184: Incomplete List of Disallowed Inputs


VersionSourceTypeScoreSeverityVector
3.1ce714d77-add3-4f53-aff5-83d477b104bbSecondary5.3MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
3.1CNACVSS5.3MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Fastify Fastify/forwarded All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA @fastifyforwarded @fastify/forwarded affected 3.0.2 semver Not specified
CNA @fastifyforwarded @fastify/forwarded unaffected 3.0.2 semver Not specified

References

ReferenceSourceLinkTags
cna.openjsf.org/security-advisories.html ce714d77-add3-4f53-aff5-83d477b104bb cna.openjsf.org Vendor Advisory
github.com/fastify/forwarded/security/advisories/GHSA-2849-m2w7-xm8f ce714d77-add3-4f53-aff5-83d477b104bb github.com Vendor Advisory, Mitigation
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: alanturing881 (en)

CNA: mcollina (en)

CNA: UlisesGascon (en)

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report