Where
-Infinity
0
Severity
8.7
Code Injection
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

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 trustremotecode=True as a literal or as an unconditional default: RerankModel.gettokenizer in xinference/model/rerank/core.py, SentenceTransformerRerankModel.load in xinference/model/rerank/sentencetransformers/core.py, SentenceTransformerEmbeddingModel.load in xinference/model/embedding/sentencetransformers/core.py, FlagEmbeddingModel.load in xinference/model/embedding/flag/core.py, and two sites in xinference/model/llm/transformers/core.py where PytorchModel.sanitizemodelconfig and PytorchModel.getcomponents 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 autodetecttype and then AutoTokenizer.frompretrained, which imports and executes Python declared by the model directory's own tokenizerconfig.json automap, running attacker-supplied code with the privileges of the worker process. Version 2.12.0 gates every site behind allowtrustremotecode and the XINFERENCETRUSTREMOTECODE setting, permitting remote code only for bundled built-in models.

First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203