If your Fastify app proxies requests to another service, check your lock file today. In the last two days the Fastify team published three security advisories for @fastify/reply-from, the plugin behind reply.from() and a dependency of @fastify/http-proxy. One is rated critical (CVSS 9.0) and allows request smuggling to the upstream; two are high-severity path-traversal bypasses. The fix for all of them is to upgrade to @fastify/reply-from 12.9.1.

This guide explains each issue in plain English, shows how to find every copy in your project, how to upgrade, and which workarounds help if you cannot deploy immediately. Sources are the official GitHub advisories: GHSA-mx78-9mrq-rfm5, GHSA-2ccw-8rvh-6cmg and GHSA-6mph-mjg3-f943.

The three advisories at a glance

Advisory Severity Affected Fixed in
GHSA-mx78-9mrq-rfm5 (CVE-2026-133212) – request smuggling via forwarded Content-Length Critical, 9.0 < 12.9.1 12.9.1
GHSA-2ccw-8rvh-6cmg – traversal via scheme-prefixed encoded dot-segments High, 8.2 >= 12.8.1, < 12.8.4 12.8.4
GHSA-6mph-mjg3-f943 (CVE-2026-127064) – traversal via ..; path parameters High, 8.2 < 12.8.4 12.8.4

Since 12.9.1 contains all fixes, that is the version to target.

1. Request smuggling through Content-Length (critical)

reply-from forwarded the client’s Content-Length header to the upstream even when it did not send a body. The upstream then waited for bytes that never arrived. On the core Node.js http transport, the keep-alive socket went back into the pool still “owing” those bytes, so the upstream read the next request on that socket as the end of the previous body.

An attacker could trigger this with ordinary input:

  • a GET, HEAD or TRACE request that carries a body (Fastify doesn’t read it), or
  • a JSON body that parses to a falsy value: null, 0, false or "".

By sizing the announced length to match a following request, the attacker could get arbitrary requests executed by the upstream outside your proxy’s routes, hooks and authentication, or exhaust the connection pool.

Who is affected

Only apps using the Node.js core http transport: you set the http option, set undici: false, or run a release before 5.0.0 where http was the default. The advisory states that the default undici transport and the HTTP/2 path are not affected.

// Affected pattern: explicit core http transport
fastify.register(require('@fastify/reply-from'), {
  base: 'http://internal-api:3000',
  http: { agentOptions: { keepAlive: true } },   // <-- core http transport
})

2. Traversal via scheme-prefixed dot-segments (high)

buildURL() checked the incoming path for . and .. segments. But if the path started with http: or https: (the same scheme as the base), the WHATWG URL parser dropped the scheme and treated the rest as relative. A payload like http:%2e%2e%2fsecret.txt passed the check, then an upstream that decodes paths before resolving dot-segments served a file outside the configured prefix. This affects 12.8.1 through 12.8.3, because the per-segment check introduced in 12.8.1 is what the scheme prefix bypasses.

3. Traversal via ..; path parameters (high)

The traversal check matched .. exactly, so segments like ..;, ..;jsessionid=x or %2e%2e; slipped through. Java servlet containers (Tomcat, Jetty, WildFly, Spring Boot) strip ; parameters and turn ..; back into ... The advisory says Node.js, nginx and Express upstreams are not affected by this one.

Both traversal bugs matter for code that scopes the proxy to a prefix, like this:

fastify.get('/public/*', (request, reply) => {
  // intended: only expose /v1/public/* on the upstream
  return reply.from('/v1/public/' + request.params['*'])
})

Find every copy in your project

reply-from is often a transitive dependency, especially via @fastify/http-proxy (its current release depends on @fastify/reply-from ^12.8.1).

npm ls @fastify/reply-from
# or
pnpm why @fastify/reply-from
yarn why @fastify/reply-from

Also check for the core transport option in your code:

grep -rnE "undici:\s*false|reply-from.*http:" src/ lib/ 2>/dev/null

Upgrade

npm install @fastify/reply-from@^12.9.1
# if you only use it via @fastify/http-proxy, refresh the lock file:
npm update @fastify/reply-from
npm ls @fastify/reply-from     # confirm 12.9.1 everywhere

Because @fastify/http-proxy uses a caret range, a fresh install or npm update pulls the patched version without changing http-proxy itself. If an older lock file pins a vulnerable version, you can force it with npm overrides:

{
  "overrides": {
    "@fastify/reply-from": "^12.9.1"
  }
}

Then run your proxy tests. The patch also changes behaviour slightly: falsy JSON bodies are now forwarded instead of silently dropped on the undici transport, which is more correct but worth a test if your upstream relied on the old behaviour.

Workarounds if you can’t deploy yet

The advisories list these stopgaps:

For the request smuggling bug, switch to the default undici transport (remove the http option or undici: false). Otherwise, reject bodies on methods that shouldn’t have them before reply.from() runs:

fastify.addHook('onRequest', async (request, reply) => {
  const hasBody =
    request.headers['content-length'] !== undefined ||
    request.headers['transfer-encoding'] !== undefined
  if (['GET', 'HEAD', 'TRACE'].includes(request.method) && hasBody) {
    return reply.code(400).send({ error: 'Body not allowed' })
  }
})

Note the advisory also recommends not forwarding falsy JSON bodies; that needs a check in your route or a preHandler hook.

For the ..; traversal, reject requests whose decoded path contains ;, or configure the servlet upstream to reject path parameters:

fastify.addHook('onRequest', async (request, reply) => {
  let path
  try {
    path = decodeURIComponent(request.raw.url.split('?')[0])
  } catch {
    return reply.code(400).send({ error: 'Bad path' })
  }
  if (path.includes(';')) {
    return reply.code(400).send({ error: 'Path parameters not allowed' })
  }
})

For the scheme-prefix traversal, the advisory lists no workaround: upgrade.

Defence in depth for any proxy

  • Prefer the default undici transport.
  • Keep authentication on the upstream too, not only in the proxy.
  • Don’t build upstream paths from raw user input when a fixed allowlist of routes will do.
  • Add a CI job that runs npm audit --omit=dev so advisories like these fail the build.

Takeaway

Three advisories in two days, one critical, all fixed by a single upgrade: move @fastify/reply-from to 12.9.1, confirm it with npm ls, and prefer the default undici transport. If you proxy to Java servlet containers or set undici: false, treat this as urgent. Full details are in the GitHub advisories.