CVE-2026-92395
nicheClient IP spoofing in @fastify/proxy-addr via IPv4-mapped IPv6 trust subnets
A flaw in @fastify/proxy-addr versions 3.0.0 through 5.1.0, the Fastify plugin that computes request.ip and request.ips, causes trust subnets written in IPv4-mapped IPv6 notation with an IPv4-sized prefix (e.g., ::ffff:10.0.0.0/8 instead of ::ffff:10.0.0.0/104) to be silently accepted as trusting every IPv4 address on the internet. In that configuration the direct socket peer is trusted at hop 0, so any unauthenticated client can supply an arbitrary X-Forwarded-For header and fully control the client address the application reads. An attacker can thereby defeat IP-based access control, rate limiting, geolocation, and audit logging. Only Fastify applications on affected plugin versions that define a trust proxy subnet in IPv4-mapped IPv6 notation with a prefix shorter than 97 bits are exploitable; the defect was inherited from the upstream proxy-addr module (CVE-2026-90711). No exploitation in the wild and no public proof-of-concept are known, and a fix is available in version 5.1.1.
What to do: Upgrade @fastify/proxy-addr to 5.1.1 or later (and apply the upstream proxy-addr fix referenced by CVE-2026-90711 if that module is used directly). Audit trustProxy settings and replace any IPv4-mapped IPv6 subnet with a prefix shorter than 97 bits using a prefix of at least 97 (e.g., /104) or plain IPv4 notation such as 10.0.0.0/8. Until patched, avoid relying on request.ip for IP allowlists, rate limiting, or audit logging.
| Fastify @fastify/proxy-addr | 3.0.0 through 5.1.0 (fixed in 5.1.1) |
| upstream npm module (inherited defect) proxy-addr | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
@fastify/proxy-addr is a Fastify plugin that determines a request's client address behind trusted reverse proxies, and it backs Fastify request.ip and request.ips. In versions 3.0.0 through 5.1.0, a trust subnet written in IPv4-mapped IPv6 notation with an IPv4-sized prefix, such as ::ffff:10.0.0.0/8 instead of the correct ::ffff:10.0.0.0/104, is accepted without error but trusts every IPv4 address on the internet rather than the block it names. Because the socket peer then becomes trusted at hop 0, any unauthenticated client can supply an arbitrary X-Forwarded-For header and control the address the application reads, which defeats IP-based access control, rate limiting, geolocation, and audit logging. The plugin inherited this defect from the upstream proxy-addr module (CVE-2026-90711). The issue is fixed in @fastify/proxy-addr 5.1.1, and users should upgrade to 5.1.1 or later. As a workaround, ensure any IPv4-mapped IPv6 trust subnet uses a prefix length of at least 97, or express the range in plain IPv4 notation.
- Weakness
- CWE-290, CWE-348, CWE-697
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
In the news0 stories
No ingested article mentions this CVE yet.