REDHAT-BUG-2484384: High severity Hugging Face Transformers vulnerability
A vulnerability in the LightGlue model loading path of huggingface/transformers version 5.2.0 allows an attacker-controlled model repository to execute arbitrary code during model initialization. The issue arises because the trustremotecode parameter, intended to prevent remote code execution, is overridden by untrusted serialized configuration data in a nested code path. Specifically, when loading a LightGlue model using AutoModel.frompretrained() with trustremotecode=False, the LightGlueConfig reads the trustremotecode value from the untrusted config.json file and propagates it into nested AutoConfig.frompretrained() calls. This results in the execution of attacker-provided Python modules, even when the victim explicitly disables remote code execution. The vulnerability poses a high risk for environments such as API inference servers, research notebooks, CI/CD pipelines, and model evaluation workers, potentially leading to credential theft, lateral movement, or persistence/backdoor deployment.
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2484384?
The severity of REDHAT-BUG-2484384 is classified as high, with a score of 7.
How do I fix REDHAT-BUG-2484384?
To fix REDHAT-BUG-2484384, update to a patched version of the Hugging Face Transformers library that addresses this vulnerability.
What impact does REDHAT-BUG-2484384 have on system security?
REDHAT-BUG-2484384 could allow an attacker to execute arbitrary code, compromising system security during model initialization.
Which version of Hugging Face Transformers is affected by REDHAT-BUG-2484384?
Hugging Face Transformers version 5.2.0 is affected by REDHAT-BUG-2484384.
What is the main issue caused by REDHAT-BUG-2484384?
The main issue caused by REDHAT-BUG-2484384 is the potential for remote code execution due to improper handling of the trust_remote_code parameter in model loading.