Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-76841: Improper Control of Generation of Code ('Code Injection') in xorbitsai inference

0
High
Published: 08/24/2026 (08/24/2026, 15:31:51 UTC)
Source: CVE Database V5
Vendor/Project: xorbitsai
Product: inference

Description

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.

CVSS v4.0

Score 8.7high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

xinference
pkg:pypi/xinference
Affected versions
<2.12.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/24/2026, 13:37:45 UTC

Technical Analysis

Xinference loads models using Hugging Face's AutoTokenizer.from_pretrained with trust_remote_code=True unconditionally in multiple loader call sites before version 2.12.0. This enables an attacker who can register a model to supply a malicious model directory containing a tokenizer_config.json with an auto_map that imports and executes arbitrary Python code. Because the code runs with the privileges of the worker process, this constitutes a code injection vulnerability. Version 2.12.0 introduces controls to restrict remote code execution to only bundled built-in models via allow_trust_remote_code and the XINFERENCE_TRUST_REMOTE_CODE setting.

Potential Impact

An attacker with the ability to register a model can execute arbitrary code on the server with the privileges of the worker process. This can lead to full compromise of the inference service environment. The vulnerability affects all versions prior to 2.12.0 and allows remote code execution without user interaction or elevated privileges beyond model launch access.

Mitigation Recommendations

Upgrade to version 2.12.0 or later, which introduces allow_trust_remote_code and the XINFERENCE_TRUST_REMOTE_CODE setting to restrict remote code execution to trusted built-in models only. Prior to upgrading, restrict model registration permissions to trusted users only to reduce risk. Patch status is not explicitly confirmed beyond the mention of version 2.12.0 gating the feature; check the vendor advisory for the latest remediation guidance.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-08-19T20:34:19.724Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a8c45b3acd9273b49946345

Added to database: 08/24/2026, 13:22:59 UTC

Last enriched: 08/24/2026, 13:37:45 UTC

Last updated: 08/25/2026, 03:26:38 UTC

Views: 8

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses