CVE-2026-76841

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.
Configurations

No configuration.

History

12 Oct 2026, 15:10

Type Values Removed Values Added
Summary
  • (es) Xinference carga modelos con la ejecución remota de código de Hugging Face habilitada incondicionalmente, y antes de la versión 2.12.0 no expone ninguna configuración para deshabilitarla. Seis sitios de llamada del cargador pasan trust_remote_code=True como un literal o como un valor predeterminado incondicional: RerankModel._get_tokenizer en xinference/model/rerank/core.py, SentenceTransformerRerankModel.load en xinference/model/rerank/sentence_transformers/core.py, SentenceTransformerEmbeddingModel.load en xinference/model/embedding/sentence_transformers/core.py, FlagEmbeddingModel.load en xinference/model/embedding/flag/core.py, y dos sitios en xinference/model/llm/transformers/core.py donde PytorchModel._sanitize_model_config y PytorchModel._get_components establecen el valor predeterminado en True. Debido a que un llamador con acceso al lanzamiento de modelos puede registrar un modelo cuyo tipo es desconocido y proporcionar una ruta de modelo arbitraria, el servidor alcanza _auto_detect_type y luego AutoTokenizer.from_pretrained, que importa y ejecuta Python declarado por el auto_map de tokenizer_config.json del propio directorio del modelo, ejecutando código suministrado por el atacante con los privilegios del proceso de trabajo. La versión 2.12.0 protege cada sitio detrás de allow_trust_remote_code y la configuración XINFERENCE_TRUST_REMOTE_CODE, permitiendo código remoto solo para modelos integrados empaquetados.

Information

Published : 2026-08-24 14:17

Updated : 2026-10-12 15:10


NVD link : CVE-2026-76841

Mitre link : CVE-2026-76841

CVE.ORG link : CVE-2026-76841


JSON object : View

Products Affected

No product.

CWE
CWE-94

Improper Control of Generation of Code ('Code Injection')