{"id":"CVE-2026-76841","aliases":["CVE-2026-76841"],"related":[],"kind":"vulnerability","state":"published","title":"Xinference through 2.11.0 Remote Code Execution via Hardcoded trust_remote_code in Model Loaders","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-08-24T13:11:59.094Z","modified":"2026-10-12T15:10:00.207Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"2.12.0","status":"affected"}],"vendor":"xorbitsai","product":"inference","package":"xinference","source":"cvelist"}],"references":[{"url":"https://github.com/xorbitsai/inference","tags":["product"],"sources":["cvelist","nvd"]},{"url":"https://github.com/xorbitsai/inference/issues/5023","tags":["issue-tracking"],"sources":["cvelist","nvd"]},{"url":"https://github.com/xorbitsai/inference/pull/5027","tags":["issue-tracking","patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/xorbitsai/inference/blob/v2.11.0/xinference/model/rerank/core.py","tags":["technical-description"],"sources":["cvelist","nvd"]},{"url":"https://www.vulncheck.com/advisories/xinference-through-remote-code-execution-via-hardcoded-trust-remote-code-in-model-loaders","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":["Fiona"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-08-26T15:56:50.906Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-76841","url":"https://www.cve.org/CVERecord?id=CVE-2026-76841","licence":"CVE Terms of Use","modified":"2026-10-01T15:21:12.439Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-76841","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-76841","licence":"Public domain","modified":"2026-10-12T15:10:00.207Z"}],"updatedAt":"2026-11-25T22:59:35.009Z","epss":{"score":0.0071,"percentile":0.54744,"date":"2026-12-01T12:00:22.000Z"}}