/

CVE-2026-33805

Severity:

HIGH RISK

(8.6)

Header Manipulation (CWE-644) in Fastify Proxy Modules

CVE-2026-33805

Modified

Vulnerability type

Category:

Header Manipulation / Message Routing Error

CWE:

CWE-644, CWE-444

Impact:

Bypass of Proxy-Level Security and Routing Controls

Severity:

HIGH RISK

(8.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

In affected Fastify proxy modules, client-supplied Connection headers are processed after the proxy has already added its own routing and security headers.

This enables attackers to selectively strip proxy-added headers from upstream requests, weakening access control, authentication, and other security logic whenever these headers are trusted.

Affected context

This vulnerability occurs in Node.js applications that use the Fastify ecosystem's proxy plugins (@fastify/reply-from and @fastify/http-proxy) to forward HTTP requests to upstream services.

It is relevant when the proxy injects headers for routing decisions, tenant isolation, authentication, or security checks, and relies on those headers being preserved.

In such deployments, client-controlled Connection headers are interpreted late in the pipeline, allowing them to influence which headers are ultimately sent to upstream servers.

Exploit preconditions

  • Attack surface: HTTP interfaces fronted by Fastify using @fastify/reply-from or @fastify/http-proxy as reverse or service proxies.
  • Required access: Ability to send crafted HTTP requests to the proxy, including custom Connection header values.
  • Trigger point: The proxy's header rewriting stage, where it adds headers and then processes the client's Connection header afterward.
  • Why exploitation is possible: The implementation allows the Connection header to declare hop-by-hop headers after the proxy has added them, causing those headers to be stripped before the request reaches the upstream.

Why this happens

The underlying issue is a misordering of header processing logic that mishandles hop-by-hop semantics for HTTP headers.

The proxy adds its own headers (for routing and security) and only afterwards interprets the client's Connection header, which can mark previously added headers as hop-by-hop and remove them.

This aligns with CWE-644: Improper Control of Hop-by-hop Messages, where intermediaries fail to correctly handle headers that should not be controlled by end clients, and CWE-444: Inconsistent Interpretation of HTTP Requests, since clients can influence how different components perceive and act on header state.

Potential impact

  • Clients may bypass proxy-enforced authentication or authorization that relies on injected headers.
  • Attackers could evade tenant or service routing constraints by stripping routing metadata headers.
  • Upstream applications can be tricked into believing requests are internal or trusted when trust headers are removed or altered.
  • Security monitoring, rate limiting, or audit mechanisms that depend on proxy-added headers can be weakened or misled.

General mitigation guidance

Mitigation centers on re-establishing strict control of hop-by-hop and security-critical headers at the proxy boundary.

Common defensive patterns include:

  • Treating the Connection header as fully controlled by the proxy, ignoring or normalizing client-supplied Connection values.
  • Performing header sanitization and hop-by-hop handling before adding security or routing headers, ensuring client input cannot retroactively affect them.
  • Clearly separating user-controllable headers from proxy-managed headers, and avoiding trust in any header that a client can directly or indirectly influence.
  • Designing security controls to rely on server-side context (such as authenticated identity) rather than only on injectable headers where feasible.

How teams detect issues like this

Organizations can detect this class of vulnerability by:

  • Reviewing proxy middleware and plugins for logic that applies client-supplied Connection headers after adding internal headers.
  • Using static analysis or linting rules that flag manipulation of hop-by-hop headers (e.g., Connection, Keep-Alive, Proxy-Authorization) based on untrusted input.
  • Implementing code review checklists that require explicit handling of hop-by-hop headers and validation of security-related headers.
  • Employing automated HTTP fuzzing or integration tests that send crafted Connection headers to verify that proxy-added security headers remain intact.

Sources

SourceLink
cna.openjsf.orgcna.openjsf.org/security-advisories.html
github.comgithub.com/fastify/fastify-reply-from/security/advisories/GHSA-gwhp-pf74-vj37
access.redhat.comaccess.redhat.com/errata/RHSA-2026:10175
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-33805
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2458651
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-33805.json

Frequently asked

questions

It affects applications that rely on @fastify/reply-from or @fastify/http-proxy for proxying and that depend on proxy-added headers for routing, security, or access control. If you do not add such headers or do not trust them for security decisions, practical risk is reduced.

An attacker only needs the ability to send HTTP requests to the vulnerable proxy endpoint, including crafting the Connection header. No special privileges are required beyond network access to the service.

The safest pattern is to ensure that client-supplied Connection headers are either ignored or processed before adding proxy-managed headers, so that clients cannot declare proxy-added headers as hop-by-hop. Additionally, centralize and lock down handling of security-critical headers at the proxy.

Adopt a defensive proxy design where hop-by-hop and security-sensitive headers are strictly controlled by the server, enforce header sanitization on untrusted input, and include explicit tests and review checks for header processing order and trust boundaries in your development lifecycle.

Find out what's already
exploitable in your codebase.