# CVE-2026-85699: jina-ai reader server-side request forgery via redirect validation bypass

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

## At a glance

CVE-2026-85699 is rated High 8.7 (CVSS 4.0, CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X). It affects Jina Reader (jina-ai) and was published on 4 Sept 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 0.5%: the estimated chance it is exploited in the next 30 days, as of 25 Nov 2026. The upatch `cve-2026-85699-ssrf-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-85699, published on 4 September 2026, is a server-side request forgery (SSRF) vulnerability in `jina-ai/reader` through commit `1574bfd380d249c86c82db4dace0d9c8fe17e2b1` (`0.5.0`). When crawling a user-supplied URL, `CrawlerHost` validates the initial URL once with `MiscService.assertNormalizedUrl` (`src/services/misc.ts`), which checks the hostname and resolved IP addresses against `isIPInNonPublicRange` (`src/utils/ip.ts`) when `privateIpNotAcceptable` is enabled (`NODE_ENV` containing `prod` and `GCLOUD_PROJECT` set). However, in `CurlControl.urlToFile` and `CurlControl.urlToBlob` (`src/services/curl.ts`), `urlToStream` disables `libcurl`'s `FOLLOWLOCATION` and follows up to 6 HTTP `301`, `302`, `303`, `307` and `308` redirects manually in a `do ... while` loop (`nextHopUrl = new URL(location || '', nextHopUrl)`) without calling `assertNormalizedUrl` or `isIPInNonPublicRange` on the redirect target. In addition, the browser request interceptor in `PuppeteerControl` (`src/services/puppeteer.ts`) only checks whether `parsedUrl.hostname === 'localhost'` or `parsedUrl.hostname.startsWith('127.')`, leaving `169.254.0.0/16`, `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`, `100.64.0.0/10`, `0.0.0.0` and IPv6 non-public ranges reachable. A public URL that responds with a `30x` redirect to an internal address or cloud metadata endpoint (`169.254.169.254`) therefore makes Reader fetch and return the internal response body.

### Official description

jina-ai reader contains a server-side request forgery vulnerability where URL validation is performed only on the initial request but not re-applied to subsequent redirect hops. Attackers can craft a public URL that redirects to internal network addresses or cloud metadata endpoints, allowing the server to fetch and return the target's response body to the attacker.

## What the upatch does

The BPF LSM program `cve_2026_85699_ssrf_block` attaches to `lsm/socket_connect` and returns `-EPERM` when a process whose executable or command name is `node` attempts to connect an `AF_INET` or `AF_INET6` socket to any of the non-public ranges defined in `src/utils/ip.ts`:

- `AF_INET`: `0.0.0.0/8`, `10.0.0.0/8`, `100.64.0.0/10`, `127.0.0.0/8`, `169.254.0.0/16` (including `169.254.169.254`), `172.16.0.0/12`, `192.168.0.0/16`, `224.0.0.0/4`, and `255.255.255.255/32`.
- `AF_INET6`: `::/128`, `::1/128`, `::127.0.0.0/104` and IPv4-compatible or IPv4-mapped (`::ffff:0:0/96`) addresses in the blocked IPv4 ranges, `fc00::/7`, `fe80::/10`, and `ff00::/8`.

The program inspects `address->sa_family` and the destination IP address first, and reads the current task's executable dentry or command name only when the destination falls in a non-public range. Because `lsm/socket_connect` runs in the kernel on every `connect()` call made by `node` (including `@nomagick/node-libcurl-impersonate` threads inside the `node` process), every redirect hop to a loopback, private, or link-local metadata address is refused before a packet is sent. A refusal from an earlier BPF LSM program on the same hook is preserved. Refusals are counted in the `refused` per-CPU array map at key 0.

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

## Side effects

- Any `node` process on the machine is refused outbound `AF_INET` and `AF_INET6` connections to loopback, RFC 1918 private, CGNAT, link-local, and multicast addresses. Inbound HTTP connections to Reader on loopback or private interfaces continue to work because `accept` does not call `socket_connect`.
- Outbound connections from `node` to public IP addresses (such as the initial hop or redirects to public origins) continue to work.
- If `PuppeteerControl` launches a local headless Chrome over a loopback TCP WebSocket rather than a pipe, or if `node` connects to a database or proxy on `127.0.0.1` or an RFC 1918 address, those outbound connections from `node` will also be refused with `EPERM`.

## Preemption model and cost

The program holds no shared state other than the `refused` per-CPU array map, which it updates with `__sync_fetch_and_add`, making it safe under all kernel preemption models including `PREEMPT_LAZY`, `PREEMPT_DYNAMIC` and `PREEMPT_RT`. On every `socket_connect` call to a Unix domain socket or a public IPv4/IPv6 address, the program checks only `sa_family` and the destination address words and returns `0` without inspecting the current task.

## Affected versions

This is an application vulnerability in `jina-ai/reader` through commit `1574bfd380d249c86c82db4dace0d9c8fe17e2b1` (`0.5.0`). The upatch uses the `lsm/socket_connect` hook and CO-RE reads on `struct sockaddr`, `struct sockaddr_in`, `struct sockaddr_in6`, `struct task_struct`, `struct file` and `struct dentry`, which are present across Linux kernels supported by shirudo with BPF LSM and BTF enabled.

## How it was tested

On jina-ai/reader 0.5.0 (commit 1574bfd380d249c86c82db4dace0d9c8fe17e2b1), an HTTP 302 redirect from a public origin to a link-local metadata listener reached the internal listener before and after the upatch was loaded, and was refused at lsm/socket_connect (HTTP 502) while loaded.

- **Tested:** 25 Nov 2026
- **Target:** jina-ai/reader 0.5.0 (commit 1574bfd380d249c86c82db4dace0d9c8fe17e2b1) with privateIpNotAcceptable enabled
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Distribution:** Ubuntu 26.04

### Results

| State           | Redirect SSRF to link-local metadata listener blocked | Direct crawl of public origin works |
| --------------- | ----------------------------------------------------- | ----------------------------------- |
| Before loading  | no                                                    | yes                                 |
| Upatch loaded   | yes                                                   | yes                                 |
| After unloading | no                                                    | yes                                 |

## 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-85699
```

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-85699-1.0.0.bee oci://<registry>/<namespace>/cve-2026-85699 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-85699-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-85699 record (CVE API)](https://cveawg.mitre.org/api/cve/CVE-2026-85699)
- [VulnCheck advisory: jina-ai reader server-side request forgery via redirect validation bypass](https://www.vulncheck.com/advisories/jina-ai-reader-server-side-request-forgery-via-redirect-validation-bypass)
- [jina-ai/reader issue #1252: Unauthenticated SSRF via unvalidated HTTP redirects](https://github.com/jina-ai/reader/issues/1252)
- [jina-ai/reader `src/services/curl.ts` at `1574bfd380d249c86c82db4dace0d9c8fe17e2b1`](https://github.com/jina-ai/reader/blob/1574bfd380d249c86c82db4dace0d9c8fe17e2b1/src/services/curl.ts)
- [jina-ai/reader `src/services/puppeteer.ts` at `1574bfd380d249c86c82db4dace0d9c8fe17e2b1`](https://github.com/jina-ai/reader/blob/1574bfd380d249c86c82db4dace0d9c8fe17e2b1/src/services/puppeteer.ts)

### Links

- [CVE-2026-85699 on upatch.dev](https://upatch.dev/cve/CVE-2026-85699) (this page, as HTML)
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-85699)
- [CVE.org](https://www.cve.org/CVERecord?id=CVE-2026-85699)
- [CWE-918](https://cwe.mitre.org/data/definitions/918.html)
- Upatch source: [upatches/cve-2026-85699](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-85699)

### More references from NVD (5)

- [github.com](https://github.com/jina-ai/reader)
- [github.com](https://github.com/jina-ai/reader/blob/1574bfd380d249c86c82db4dace0d9c8fe17e2b1/src/services/curl.ts)
- [github.com](https://github.com/jina-ai/reader/blob/1574bfd380d249c86c82db4dace0d9c8fe17e2b1/src/services/puppeteer.ts)
- [github.com](https://github.com/jina-ai/reader/issues/1252)
- [vulncheck.com](https://www.vulncheck.com/advisories/jina-ai-reader-server-side-request-forgery-via-redirect-validation-bypass)
