Mittel

fastify: request.protocol and request.host Spoofable via X-Forwarded-Proto/Host from Untrusted Connections

  • Veröffentlicht: 25.03.2026
  • Aktualisiert: 11.10.2026 10:22

Summary

When trustProxy is configured with a restrictive trust function (e.g., a specific IP like trustProxy: '10.0.0.1', a subnet, a hop count, or a custom function), the request.protocol and request.host getters read X-Forwarded-Proto and X-Forwarded-Host headers from any connection — including connections from untrusted IPs. This allows an attacker connecting directly to Fastify (bypassing the proxy) to spoof both the protocol and host seen by the application.

Affected Versions

fastify <= 5.8.2

Impact

Applications using request.protocol or request.host for security decisions (HTTPS enforcement, secure cookie flags, CSRF origin checks, URL construction, host-based routing) are affected when trustProxy is configured with a restrictive trust function.

When trustProxy: true (trust everything), both host and protocol trust all forwarded headers — this is expected behavior. The vulnerability only manifests with restrictive trust configurations.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
npm-Paket fastify < 5.8.3 5.8.3

Verweise

CVSS-Wert 6.1/10
CVSS-Vektor
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
Schwäche (CWE)
CWE-348
Plattform
npm
Paket
fastify
Veröffentlicht
25.03.2026
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-444r-cwp2-x5xf - CC BY 4.0

Schwachstellenhistorie: fastify

Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (16) im Archiv
Einträge insgesamt
16
Erste → letzte
07.2018 09.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Hoch 8
  • Mittel 7
  • Niedrig 1

Veröffentlichungen pro Jahr

  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
Schweregrad:
  1. fastify: request.protocol and request.host Spoofable via X-Forwarded-Proto/Host from Untrusted Connections dieser Eintrag
    Mittel · 6.1 CVE-2026-3635 < 5.8.3 5.8.3
  2. Hoch · 7.5 CVE-2025-32442 >= 5.0.0, < 5.3.2, >= 4.29.0, < 4.29.1 5.3.2, 4.29.1
  3. Hoch · 7.5 CVE-2022-39288 >= 4.0.0, < 4.8.1 4.8.1

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.