Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with low-privilege model-launch credential
-
DeliveryRegister malicious model pointing to attacker-controlled path
-
ExploitTrigger model load via Xinference API
-
ExecutionAutoTokenizer.from_pretrained reads crafted tokenizer_config.json auto_map
-
PersistImport executes attacker-supplied Python module
-
ImpactArbitrary code runs at worker-process privilege
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a user account with model-launch (model registration) access on the Xinference server, consistent with CVSS PR:L - fully unauthenticated exploitation is not possible. The attacker must supply an arbitrary model path - either a local filesystem path reachable by the Xinference worker process, or a Hugging Face Hub model ID under attacker control - whose directory contains a crafted tokenizer_config.json with a malicious auto_map entry. No special non-default server configuration beyond allowing user-defined model registration is required; this is a standard Xinference deployment mode. Exploitation is limited by: (1) the requirement for authenticated model-launch access, ruling out anonymous internet-facing attacks; (2) the model path must be accessible to the worker process at load time, either via filesystem or network download; (3) deployments where only trusted administrators can register models reduce exploitability to an insider-threat scenario despite being technically vulnerable under the CVE scope. |
| Impact | The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N, score 8.7) reflects network-accessible exploitation requiring only low-privilege authentication, with high impact on confidentiality, integrity, and availability of the vulnerable system - an accurate characterization of the attack surface. No EPSS score was provided, so quantitative exploitation probability cannot be assessed. The vulnerability is not listed in CISA KEV and no public exploit code was referenced in any intelligence source, which meaningfully reduces immediate mass-exploitation risk compared to a KEV-listed issue. Practical risk is moderate-to-high specifically for deployments that expose model registration to non-administrator users; deployments where only trusted operators can register models face substantially lower realized risk despite being technically vulnerable. The PR:L requirement prevents fully unauthenticated exploitation and limits automated scanning-style attacks, but does not protect against malicious insiders, compromised user accounts, or multi-tenant deployments. Attack complexity is low and no user interaction is required once the malicious model is registered, making exploitation straightforward for a credentialed attacker. |
| Exploit ScenarioDerived | An attacker with a valid Xinference account and model-launch permission constructs a malicious directory containing a tokenizer_config.json with an auto_map entry that references an attacker-supplied Python file containing arbitrary OS commands or a reverse shell payload. The attacker registers this model via the Xinference API supplying the malicious directory as the model path, then triggers model loading; AutoTokenizer.from_pretrained unconditionally imports the attacker's Python module, executing the payload at the privilege level of the Xinference worker process. No public exploit code has been identified at time of analysis, but the mechanism is well-understood and the steps require only standard Hugging Face model format knowledge. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 24, 2026
Remote code execution in Xinference (all versions before 2.12.0) allows any user with model-launch access to execute arbitrary Python code on the server at worker-process privilege level. Six model loader call sites across the rerank, embedding, and LLM subsystems hardcode trust_remote_code=True when invoking Hugging Face AutoTokenizer.from_pretrained, meaning a registered model with an attacker-controlled path can ship a malicious tokenizer_config.json whose auto_map entries are imported and executed unconditionally upon model load. No public exploit has been identified at time of analysis and the vulnerability is not listed in CISA KEV, but any Xinference deployment that permits user-defined model registration is exposed without the 2.12.0 patch.
RemediationAI
The primary fix is to upgrade to Xinference version 2.12.0, which introduces the allow_trust_remote_code utility function and gates all six previously unconditional loader call sites behind it. After upgrading, remote code execution via Hugging Face model loading is disabled by default; operators who legitimately need it for bundled built-in models must set the environment variable XINFERENCE_TRUST_REMOTE_CODE=1 (also accepts 'true' or 'yes'). The patch is tracked in GitHub pull request #5027 at https://github.com/xorbitsai/inference/pull/5027 and the patch was confirmed merged per the PR diff. For deployments that cannot immediately upgrade, the most effective compensating control is restricting model registration access to trusted administrators only - revoking untrusted users' ability to register arbitrary model paths eliminates the attacker-controlled input that triggers the vulnerability, at the trade-off of reducing self-service model onboarding. Network-level controls such as restricting API access to the model registration endpoints are a secondary compensating measure but do not eliminate risk from insider threats or compromised credentials.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Hugging Face's Transformers library supports a trust_remote_code flag that allows model repositories to ship and auto-execute custom Python code during model loading. When enabled, AutoTokenizer.from_pretrained reads the model directory's tokenizer_config.json auto_map field to dynamically import and instantiate custom tokenizer classes - a powerful extensibility feature that becomes a code-injection vector when the model directory is attacker-controlled. Xinference (CPE: cpe:2.3:a:xorbitsai:inference:*:*:*:*:*:*:*:*) hard-coded trust_remote_code=True across six distinct loader call sites: RerankModel._get_tokenizer in xinference/model/rerank/core.py, SentenceTransformerRerankModel.load in xinference/model/rerank/sentence_transformers/core.py, SentenceTransformerEmbeddingModel.load in xinference/model/embedding/sentence_transformers/core.py, FlagEmbeddingModel.load in xinference/model/embedding/flag/core.py, and PytorchModel._sanitize_model_config plus PytorchModel._get_components in xinference/model/llm/transformers/core.py. The root cause class is CWE-94 (Improper Control of Code Generation), where attacker-supplied model directory contents are passed directly into a code-executing import pathway without any validation or gating on model provenance.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Network-accessible with low-privilege model-launch credential required (PR:L, AV:N, AC:L); no scope change as impact is confined to the worker process (S:U); full C/I/A impact via arbitrary code execution.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
Xinference loads models with Hugging Face remote code execution unconditionally enabled, and before version 2.12.0 exposes no setting to disable it. Six loader call sites pass trust_remote_code=True as a literal or as an unconditional default: RerankModel._get_tokenizer in xinference/model/rerank/core.py, SentenceTransformerRerankModel.load in xinference/model/rerank/sentence_transformers/core.py, SentenceTransformerEmbeddingModel.load in xinference/model/embedding/sentence_transformers/core.py, FlagEmbeddingModel.load in xinference/model/embedding/flag/core.py, and two sites in xinference/model/llm/transformers/core.py where PytorchModel._sanitize_model_config and PytorchModel._get_components default the value to True. Because a caller with model launch access can register a model whose type is unknown and supply an arbitrary model path, the server reaches _auto_detect_type and then AutoTokenizer.from_pretrained, which imports and executes Python declared by the model directory's own tokenizer_config.json auto_map, running attacker-supplied code with the privileges of the worker process. Version 2.12.0 gates every site behind allow_trust_remote_code and the XINFERENCE_TRUST_REMOTE_CODE setting, permitting remote code only for bundled built-in models.
Articles & Coverage 1
Executive ViewAI
Xinference versions prior to 2.12.0 contain a remote code execution vulnerability allowing execution of arbitrary Python code on servers through malicious tokenizer configurations. While no public exploit has been identified at time of analysis, organizations running Xinference with user-defined model registration capabilities face direct risk of system compromise and potential data exfiltration.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-64847
GHSA-9cx2-fwcj-qq73
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB