/

CVE-2026-85668

Severity:

HIGH RISK

(7.5)

Arbitrary File Read (CWE-73) in Xinference Auto-Register

CVE-2026-85668

Deferred

Vulnerability type

Category:

Unrestricted Pathname Control

CWE:

CWE-73

Impact:

Unauthorized File Disclosure

Severity:

HIGH RISK

(7.5)

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

Xinference exposes an unauthenticated model auto-registration endpoint that accepts a caller-controlled filesystem path. The service may read and return selected configuration files from that path, allowing an unauthenticated attacker to discover filesystem content and extract sensitive data when reachable files use the expected names.

Affected context

The vulnerability occurs in Xinference's POST /v1/models/llm/auto-register endpoint when it is accessible without authentication and accepts a model_path value without restricting it to an approved model directory. The endpoint attempts to read files such as config.json, tokenizer_config.json, and chat_template.jinja, then reflects parsed content to the requester. Exposure depends on network reachability, filesystem permissions, and the presence of readable files with those names.

Exploit preconditions

  • Attack surface: The HTTP POST /v1/models/llm/auto-register endpoint
  • Required access: Network access to the endpoint; authentication is not required by the affected behavior
  • Trigger point: Processing a caller-supplied model_path during model auto-registration
  • Why exploitation is possible: The supplied path is not sufficiently confined to an approved directory, and selected files are read and returned based on that path

Why this happens

The underlying flaw is external control over a filesystem pathname without adequate validation, canonicalization, or directory confinement. The endpoint treats attacker-influenced path data as a trusted model location and performs file reads before establishing that the location belongs to an authorized model repository. This behavior maps to CWE-73: External Control of File Name or Path, because untrusted input influences which filesystem resources the application accesses.

Potential impact

  • An attacker may read sensitive model or application configuration content
  • The service could disclose filesystem structure and deployment details
  • Credentials, tokens, or internal endpoints could be exposed if present in readable matching files
  • Repeated probing may support broader reconnaissance of the hosting environment

General mitigation guidance

Mitigation generally focuses on removing unauthenticated access where it is not required and reducing trust in caller-supplied paths.

Common defensive patterns include:

  • Restricting model paths to configured, approved directories
  • Canonicalizing paths and rejecting values that resolve outside permitted roots
  • Using allowlisted model identifiers rather than accepting arbitrary filesystem paths
  • Enforcing authentication and authorization before model registration
  • Limiting the service account's filesystem permissions and isolating model data
  • Returning only the minimum metadata required for the operation
  • Applying secure-by-default network policies that limit endpoint exposure

How teams detect issues like this

Organizations can identify this class of issue through:

  • Static analysis rules for filesystem APIs receiving request parameters
  • Code review checks for missing path canonicalization, root confinement, or allowlists
  • API policy checks for sensitive endpoints that lack authentication or authorization
  • Runtime monitoring of unusual model-path values and repeated registration requests
  • File access auditing for unexpected reads of configuration files outside approved model directories

Automated security review tools may help flag externally controlled path arguments and unauthenticated file-access workflows.

Sources

SourceLink
github.comgithub.com/xorbitsai/inference
github.comgithub.com/xorbitsai/inference/blob/v3.3.0/xinference/model/llm/config_parser.py
github.comgithub.com/xorbitsai/inference/issues/5176
vulncheck.comvulncheck.com/advisories/xinference-3.3.0-unauthenticated-arbitrary-path-file-read-via-v1-models-llm-auto-register

Frequently asked

questions

Yes, when the auto-registration endpoint is network-reachable and exposed without authentication. The practical scope depends on deployment networking and filesystem permissions.

An attacker generally needs only HTTP access to the affected endpoint. The service account must also be able to read the targeted files.

Avoid accepting arbitrary filesystem paths from callers. Use authenticated, authorized model identifiers backed by an allowlisted directory and enforce canonical path confinement.

Treat all request-derived paths as untrusted, apply centralized path-validation policies, minimize service-account permissions, and test sensitive endpoints for unauthorized file access during security reviews.

Find out what's already
exploitable in your codebase.