Średnia

fastify vulnerable to X-Forwarded-* spoofing under trustProxy hop-count

  • Ujawniono: 02.09.2026
  • Aktualizacja: 11.10.2026 10:22

Impact

The fix for CVE-2026-3635 (GHSA-444r-cwp2-x5xf) added a proxyFn(socket.remoteAddress, 0) guard on the X-Forwarded-* reads in request.host, request.protocol, request.hostname, request.ip, and request.ips. That guard closes the IP, CIDR, and custom-function forms of trustProxy correctly because those forms compile to predicates that inspect the connecting address. The hop-count form (trustProxy: <number>) compiles to a predicate that structurally ignores the address argument, so the guard reduces to 0 < tp, always true for any tp >= 1.

Applications configured with trustProxy: <number> (documented as "behind N reverse proxies", trustProxy: 1 being the canonical single-proxy setting) remain vulnerable. An attacker who can reach the Fastify origin directly, bypassing the front-facing proxy, can spoof the request fields exactly as in the unpatched version. Impact class matches the parent CVE-2026-3635: host injection in generated URLs, HTTPS-enforcement bypass, secure-cookie / CSRF-origin bypass, host-based routing and cache poisoning.

Patches

Patched in fastify 5.12.1. The numeric form of trustProxy is now disabled at runtime and removed from the TypeScript type union.

Workarounds

  • Migrate to an IP / CIDR / custom-function trustProxy value that validates the connecting address. Custom functions must inspect the address argument, not only the hop index.
  • Ensure the Fastify origin is only reachable through the trusted proxy chain (no direct network path).

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Paczka npm fastify >= 5.8.3, < 5.12.1 5.12.1

Odnośniki

Ocena CVSS 6.1/10
Wektor CVSS
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
Słabość (CWE)
CWE-348
Platforma
npm
Paczka
fastify
Ujawniono
02.09.2026
Aktualizacja
11.10.2026 10:22

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-3m5p-2c4r-xxw2 - CC BY 4.0

Historia podatności: fastify

Wszystkie opisane podatności tej paczki (Paczka npm), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkie (16) w archiwum
Wszystkich wpisów
16
Pierwsza → ostatnia
07.2018 09.2026
Bez poprawki
0
Wykorzystywana w atakach
0

Rozkład istotności

  • Wysoka 8
  • Średnia 7
  • Niska 1

Ujawnienia w latach

  1. 2018: 1
  2. 2019: 0
  3. 2020: 1
  4. 2021: 0
  5. 2022: 2
  6. 2023: 0
  7. 2024: 0
  8. 2025: 1
  9. 2026: 11
Istotność:
  1. fastify vulnerable to X-Forwarded-* spoofing under trustProxy hop-count ten wpis
    Średnia · 6.1 CVE-2026-16732 >= 5.8.3, < 5.12.1 5.12.1
  2. Wysoka · 7.5 CVE-2025-32442 >= 5.0.0, < 5.3.2, >= 4.29.0, < 4.29.1 5.3.2, 4.29.1
  3. Wysoka · 7.5 CVE-2022-39288 >= 4.0.0, < 4.8.1 4.8.1
  4. Wysoka · 7.5 CVE-2018-3711 < 0.38.0 0.38.0

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.