Sanaan Fayaz Wani

xorbitsai/inference

CVE-2026-49950

Unauthenticated remote code execution through the Xinference actor transport

CVE-2026-49950

9.3

Critical

CVSS 4.0 base

  1. 2026-10-16Published by the maintainer

What to do

If you run xinference 4.0.1 and earlier, no fixed version is listed in the advisory.

Anyone who can reach it over the network, with no account and no user interaction, can read and change sensitive data and make it unavailable.Read from the CVSS 4.0 vector

CVSS 4.0 metrics

To exploit it

Attack vector
Network
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
None

What it gets

Confidentiality
High
Integrity
High
Availability
High

Other systems

Confidentiality
None
Integrity
None
Availability
None

Open this vector in the FIRST calculator ↗

Weakness
CWE-306, CWE-502 Missing Authentication for Critical Functionality · Deserialization of Untrusted Data
CVE
CVE-2026-49950
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

My analysis of this finding: root cause, the vulnerable code, the impact and the fix, in the site’s format. The official advisory of record is linked above.

Affected versions

Package Ecosystem Vulnerable Fixed in
xinference pip <= 4.0.1 n/a

Summary

Xinference’s actor-pool TCP listener feeds every inbound frame header to cloudpickle.loads() before any authentication, handshake, or structural check. Anyone who can reach that port runs arbitrary code as the Xinference process user, which in the shipped container is root. This sits entirely outside the REST authentication added in v3.2.0: on the same instance where GET /v1/models correctly answered 401 Could not validate credentials, a single unauthenticated TCP frame ran id as root.

The port is not obscure. xinference-supervisor and xinference-worker default --host to 0.0.0.0 (XINFERENCE_DEFAULT_DISTRIBUTED_HOST, xinference/constants.py:266), the shipped docker-compose-distributed.yml publishes the actor ports on fixed numbers, and the unauthenticated GET /v1/address hands the address over verbatim.

Where it lives

The sink is in xoscar 0.9.8, the version xinference==3.2.0 installs. xoscar/serialization/aio.py:

async def _get_obj_header_bytes(self):    header_bytes = bytes(await self._readexactly(11))    ...    header_length = get_header_length(header_bytes)    return await self._readexactly(header_length) async def get_header(self):    return cloudpickle.loads(await self._get_obj_header_bytes())

The bugonly a version byte and two integers are validatedThe bugunpickles raw socket header bytes before any authentication

get_header_length() validates only a one-byte version constant and reads two integers; the header bytes then go straight into cloudpickle.loads(), which executes __reduce__ during unpickling. The path from an accepted socket to that call carries no token exchange, HMAC, peer allowlist, or find_class override: asyncio.start_server(handle_connection, ...) in socket.py, then on_new_channel() in backends/pool.py loops await channel.recv() immediately, and recv() calls AioDeserializer(self.reader).get_header() as its first read.

Xinference then decides to expose it, and leaves the discovery endpoint open. xinference/api/routers/admin.py:1443:

router.add_api_route("/v1/address", get_address, methods=["GET"])

The bugregisters the address endpoint with no auth dependency

Four lines below, /v1/cluster/monitor_config does carry Security(auth, scopes=["admin"]), so the omission is not a router-wide decision.

Impact

A full wire frame is 11 bytes of header plus the pickle payload; my standalone poc.py builds one from the standard library alone and needs no xinference installed. Running it against the default-argument supervisor produced uid=0(root) gid=0(root) groups=0(root).

Beyond the raw gadget, an attacker can speak the protocol and call SupervisorActor’s own methods, including launch_builtin_model with virtual_env_packages, the exact method POST /v1/models forwards to after its scope check. Reached over the actor port, that check never runs. From the foothold the attacker reads /root/.xinference/auth/jwt_secret_key and mints valid administrator JWTs, so the v3.2.0 auth system is fully recoverable by someone who never authenticated. In a distributed cluster the supervisor dispatches the attacker’s package list to a worker’s _prepare_virtual_env on a separate host, so compromising the one reachable node yields root on machines the attacker has no network path to. That cross-host boundary crossing, where compromise of the one reachable node yields root on machines the attacker has no network path to, is a scope change: the impact does not stay inside the component the attacker first reached.

Fix

The listener must stop treating socket bytes as trusted pickle. Replace cloudpickle on the inbound header path with a non-executing codec (msgpack, protobuf, JSON), keeping pickle only for post-authentication payloads; or require a shared cluster secret and HMAC-verify every frame before deserializing. Independently, and fixable within Xinference: put the same Security(auth, ...) dependency on GET /v1/address that its neighbour already has, stop returning actor-pool addresses from GET /status, and default the distributed hosts to 127.0.0.1.

The record

Weakness
CWE-306 Missing Authentication for Critical Functionality
CWE-502 Deserialization of Untrusted Data
Affected
xinference 4.0.1 and earlier
Fixed in
Not listed
Disclosure
2026-10-16 Published
Advisory
GHSA-2hj6-h88x-mv4j
CVE-2026-49950

About this writeup

Sanaan Fayaz Wani (GitHub sfwani) reported this vulnerability to the xinference maintainers under coordinated disclosure and is credited as a reporter in GHSA-2hj6-h88x-mv4j, published 2026-10-16.

All published findings: advisory index.