# CVE-2026-85668: Xinference 3.3.0 Unauthenticated Arbitrary-Path File Read via /v1/models/llm/auto-register

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

## At a glance

CVE-2026-85668 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 Xinference (xorbitsai) and was published on 4 Sept 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 0.6%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-85668-config-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-85668, published on 4 September 2026, is an unauthenticated arbitrary-path file read in Xinference (`xorbitsai/inference`, v3.x up to 3.3.0, commit `4a94832`). In `xinference/model/llm/config_parser.py`, `build_llm_registration_from_local_config()` handles `POST /v1/models/llm/auto-register` by taking a caller-supplied `model_path` without path confinement and reading `config.json`, `tokenizer_config.json`, and `chat_template.jinja` at that path. Numeric model fields parsed from `config.json` (such as `max_position_embeddings` and `num_parameters`) and capabilities inferred from `tokenizer_config.json` and `chat_template.jinja` are reflected in the HTTP response, letting an unauthenticated caller probe directories across the server filesystem.

### Official description

Xinference (affected commit 4a94832, v3.x) contains an unauthenticated arbitrary-path file read vulnerability in the POST /v1/models/llm/auto-register endpoint, which accepts a caller-supplied model_path parameter without authentication or path confinement. The endpoint reads and parses config.json, tokenizer_config.json, and chat_template.jinja files at the supplied path and reflects the parsed content back to the caller, allowing an unauthenticated attacker to probe the server filesystem and extract content of files with those names in any directory.

## What the upatch does

The BPF LSM program `cve_2026_85668_config_block` attaches to `lsm/file_open` and returns `-EPERM` when all of the following hold:

1. The file being opened is named `config.json`, `tokenizer_config.json`, or `chat_template.jinja`.
2. None of its ancestor directories (up to 8 levels) is named `.xinference`, where Xinference stores its model and cache directories by default.
3. The current task's command name starts with `xinference` or its executable name starts with `python`.

Any refusal from an earlier BPF LSM program on the hook is preserved.

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

## Side effects

- `POST /v1/models/llm/auto-register` fails with HTTP 500 when `model_path` points outside a `.xinference` directory, matching the upstream fix that restricts auto-registration to allowed model roots.
- Python processes on the host cannot open files literally named `config.json`, `tokenizer_config.json`, or `chat_template.jinja` unless the file sits under a `.xinference` directory.
- Model registration and loading from `~/.xinference/model` and `~/.xinference/cache` continue to work when located within 8 directory levels of `.xinference`.

## Preemption model and cost

The program is stateless and uses no maps or locks, so it is safe under every kernel preemption model, including `PREEMPT_LAZY`, preemptible RCU, and `PREEMPT_RT`. On every `file_open` event whose file name length is not 11, 19, or 21 bytes, the program reads `dentry->d_name.len` and returns immediately.

## Affected versions

- Xinference (`xorbitsai/inference`): v3.x through v3.3.0 (including commit `4a94832`, 3.4.0, 3.5.0, 4.0.0, and 4.0.1).
- Fixed in commit `90c3b59e86fc95530e0adbe459c0fd0ea567ea1b` (`fix(models): restrict auto-registration paths and flexible launchers (#5766)`), shipped in v4.1.0.

## How it was tested

On a vulnerable Xinference 3.3.0 server, POST /v1/models/llm/auto-register read config.json from an arbitrary directory before and after the upatch was loaded, and was blocked with HTTP 500 while the upatch was loaded.

- **Tested:** 25 Nov 2026
- **Target:** Xinference 3.3.0 on Python 3.12, listening on 127.0.0.1:9997 with XINFERENCE_AUTH_ADVANCED=0
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Distribution:** Ubuntu 26.04

### Results

| State           | POST /v1/models/llm/auto-register arbitrary-path config.json read |
| --------------- | ----------------------------------------------------------------- |
| Before loading  | reached (HTTP 200)                                                |
| Upatch loaded   | blocked (HTTP 500)                                                |
| After unloading | reached (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-85668
```

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-85668-1.0.0.bee oci://<registry>/<namespace>/cve-2026-85668 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-85668-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-85668 record (CVE API)](https://cveawg.mitre.org/api/cve/CVE-2026-85668)
- [VulnCheck advisory](https://www.vulncheck.com/advisories/xinference-3.3.0-unauthenticated-arbitrary-path-file-read-via-v1-models-llm-auto-register)
- [GitHub issue #5176](https://github.com/xorbitsai/inference/issues/5176)
- [Vulnerable source (`xinference/model/llm/config_parser.py` at v3.3.0)](https://github.com/xorbitsai/inference/blob/v3.3.0/xinference/model/llm/config_parser.py)
- [Fix commit 90c3b59e86fc](https://github.com/xorbitsai/inference/commit/90c3b59e86fc95530e0adbe459c0fd0ea567ea1b)

### Links

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

### More references from NVD (4)

- [github.com](https://github.com/xorbitsai/inference)
- [github.com](https://github.com/xorbitsai/inference/blob/v3.3.0/xinference/model/llm/config_parser.py)
- [github.com](https://github.com/xorbitsai/inference/issues/5176)
- [vulncheck.com](https://www.vulncheck.com/advisories/xinference-3.3.0-unauthenticated-arbitrary-path-file-read-via-v1-models-llm-auto-register)
