# CVE-2026-85124: @fastify/http-proxy vulnerable to prefix escape via backslash dot-segments

The Markdown version of <https://upatch.dev/cve/CVE-2026-85124>. Last updated 25 Nov 2026.

## At a glance

CVE-2026-85124 is rated High 7.5 (CVSS 3.1, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N). It affects @fastify/http-proxy and was published on 3 Sept 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 0.7%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-85124-backslash-block` mitigates it, and is vetted (merged into the registry).

A upatch is a signed BPF program that shirudo loads into a running Linux kernel to block the code path this CVE's exploit takes. It holds the line until the fix ships; it does not replace patching.

## The vulnerability

CVE-2026-85124, "`@fastify/http-proxy` vulnerable to prefix escape via backslash dot-segments", was published on 3 September 2026 (GHSA-qv33-689p-2xq5). Versions of `@fastify/http-proxy` before 11.6.2 do not validate proxied HTTP request paths for backslash-based dot-segments before forwarding them to the configured upstream. While the WebSocket path validates destinations, the plain HTTP request handler passes the rewritten path to `@fastify/reply-from`, which only rejects forward-slash traversal (`/../`). When `@fastify/http-proxy` is configured with `prefix` and `rewritePrefix` (such as `prefix: '/pub'` and `rewritePrefix: '/internal'`), a request path containing backslashes and `..` segments (such as `/pub/dir\..\..\secret` or `/pub/dir%5c..%5c..%5csecret`) is passed to the WHATWG `new URL()` constructor, which normalizes \`\` to `/` and resolves the `..` segments upward, escaping `/internal` and reaching hidden upstream endpoints such as `/secret`.

### Official description

@fastify/http-proxy versions before 11.6.2 do not validate proxied HTTP request paths for backslash based dot-segments before forwarding them to the configured upstream. The plain HTTP request handler skips the destination validation that the WebSocket path performs, and the underlying reply-from library only rejects forward-slash traversal, so a request containing backslash dot-segments can escape the boundary set by the prefix and rewritePrefix options. An unauthenticated network attacker can use this to reach upstream paths that were meant to stay hidden behind the proxy, resulting in disclosure of internal endpoints. This is a path traversal issue (CWE-22). Users should upgrade to @fastify/http-proxy 11.6.2 or later.

## What the upatch does

The program attaches to `cgroup_skb/ingress` at the root of the unified cgroup hierarchy and inspects incoming IPv4 and IPv6 TCP packets that carry at least 16 bytes of payload:

| Hook                 | Refused                                                                                                                                |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `cgroup_skb/ingress` | Incoming TCP packets starting with an HTTP request line whose request path contains `\..`, `..`, `%5c..`, `%5C..`, `..%5c`, or `..%5C` |

When a matching packet is seen, the program increments key 0 of the `refused` per-CPU array map and returns `0` to drop the packet before the application socket receives it. All other packets return `1`.

The policy: [`cve-2026-85124-backslash-block.bpf.c`](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-85124), 160 lines of BPF C attached at `cgroup_skb/ingress`, licensed GPL-2.0 OR BSD-2-Clause.

## Side effects

- Plain-text HTTP requests whose first packet contains `\..`, `..`, `%5c..`, `%5C..`, `..%5c`, or `..%5C` in the request path (within the first 96 bytes of the TCP payload) are dropped by the kernel and time out at the client.
- Standard HTTP requests using normal paths and query strings are unaffected.
- Not covered: HTTPS traffic terminated inside the Node.js process, HTTP/2 or HTTP/3 requests, or requests where the backslash dot-segment begins past the first 90 bytes of the HTTP request line.

## Preemption model and cost

The program keeps no state beyond the `refused` per-CPU counter map, which it updates with an atomic fetch-and-add, so it is safe under every kernel preemption model including `PREEMPT_LAZY` and `PREEMPT_RT`. Non-TCP packets and TCP acknowledgements without payload exit after header checks; non-HTTP TCP segments exit on the first non-uppercase byte of the payload.

## Affected versions

`@fastify/http-proxy`:

| Package               | Affected   | Fixed in |
| --------------------- | ---------- | -------- |
| `@fastify/http-proxy` | `< 11.6.2` | `11.6.2` |

Kernels: any Linux kernel supported by shirudo with `cgroup_skb/ingress` support.

## How it was tested

While loaded, the upatch dropped incoming HTTP requests containing backslash dot-segments at cgroup_skb/ingress while normal proxied requests succeeded. With the transitive @fastify/reply-from dependency rejecting the path with HTTP 400 before and after loading, the test shows the kernel refusal.

- **Tested:** 25 Nov 2026
- **Target:** @fastify/http-proxy 11.6.1 on Fastify 5.2.0 and Node.js 22.14.0 with prefix /pub and rewritePrefix /internal, loopback only
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Machine:** shirudo test VM

### Results

| State           | Backslash dot-segment request (/pub/dir%5c..%5c..%5csecret) | Normal proxied request (/pub/probe) |
| --------------- | ----------------------------------------------------------- | ----------------------------------- |
| Before loading  | HTTP 400 (unsupported)                                      | HTTP 200                            |
| Upatch loaded   | dropped (blocked)                                           | HTTP 200                            |
| After unloading | HTTP 400 (unsupported)                                      | HTTP 200                            |

## How to apply

Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.

Build and sign:

```sh
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-85124
```

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-85124-1.0.0.bee oci://<registry>/<namespace>/cve-2026-85124 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-85124-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>
```

## Review

- Contributors: romanlab.
- Reviewers: none recorded yet.

## Sources and links

- [CVE-2026-85124 record (CVE API)](https://cveawg.mitre.org/api/cve/CVE-2026-85124)
- [GitHub Security Advisory GHSA-qv33-689p-2xq5](https://github.com/fastify/fastify-http-proxy/security/advisories/GHSA-qv33-689p-2xq5)
- [OpenJS Foundation Security Advisories](https://cna.openjsf.org/security-advisories.html)
- [Release v11.6.2](https://github.com/fastify/fastify-http-proxy/releases/tag/v11.6.2)
- [Fix commit 2dd5125c3c54](https://github.com/fastify/fastify-http-proxy/commit/2dd5125c3c54eb578b0504f8a45bc84fb3dac49d)

### Links

- [CVE-2026-85124 on upatch.dev](https://upatch.dev/cve/CVE-2026-85124) (this page, as HTML)
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-85124)
- [CVE.org](https://www.cve.org/CVERecord?id=CVE-2026-85124)
- [Vendor advisory](https://github.com/fastify/fastify-http-proxy/security/advisories/GHSA-qv33-689p-2xq5)
- [CWE-22](https://cwe.mitre.org/data/definitions/22.html)
- Upatch source: [upatches/cve-2026-85124](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-85124)

### More references from NVD (2)

- [github.com](https://github.com/fastify/fastify-http-proxy/security/advisories/GHSA-qv33-689p-2xq5) (Vendor Advisory)
- [cna.openjsf.org](https://cna.openjsf.org/security-advisories.html) (Third Party Advisory)
