CVE-2026-5241
Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers
CVE-2026-5241 is a high vulnerability (CVSS 8.0) in Huggingface Huggingface/transformers, published June 3, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.60%, the 48th percentile. Fixed in transformers 5.5.0.
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 trust_remote_code 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.from_pretrained() with trust_remote_code=False, the LightGlueConfig reads the trust_remote_code value from the untrusted config.json file and propagates it into nested AutoConfig.from_pretrained() 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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List
7.7
Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers
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 trust_remote_code 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.from_pretrained() with trust_remote_code=False, the LightGlueConfig reads the trust_remote_code value from the untrusted config.json file and propagates it into nested AutoConfig.from_pretrained() 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.
- Record
CVE-2026-5241- CVSS 3.1
- 7.7 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N - CVSS 3.0
- 8.0 High
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N - Weakness
- CWE-829, CWE-829
- Updated
- 2026-11-02
EUVDEUVD-2026-34084
7.7
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 trust_remote_code 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.from_pretrained() with trust_remote_code=False, the LightGlueConfig reads the trust_remote_code value from the untrusted config.json file and propagates it into nested AutoConfig.from_pretrained() 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.
- Record
EUVD-2026-34084- CVSS 3.1
- 7.7 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-fgcw-684q-jj6r
8.0
huggingface/transformers: Arbitrary Code Execution During Model Initialization in the LightGlue Model Loading Path
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 trust_remote_code 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.from_pretrained() with trust_remote_code=False, the LightGlueConfig reads the trust_remote_code value from the untrusted config.json file and propagates it into nested AutoConfig.from_pretrained() 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.
- Record
GHSA-fgcw-684q-jj6r- CVSS 3.0
- 8.0 High
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N - Weakness
- CWE-829
- Updated
- 2026-11-02
NVD
9.6
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 trust_remote_code 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.from_pretrained() with trust_remote_code=False, the LightGlueConfig reads the trust_remote_code value from the untrusted config.json file and propagates it into nested AutoConfig.from_pretrained() 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.
- Record
CVE-2026-5241- CVSS 3.1
- 9.6 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H - CVSS 3.1
- 7.7 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N - CVSS 3.0
- 8.0 High
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N - Weakness
- CWE-829
- Updated
- 2026-11-02
OSV
7.7
Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers
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 trust_remote_code 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.from_pretrained() with trust_remote_code=False, the LightGlueConfig reads the trust_remote_code value from the untrusted config.json file and propagates it into nested AutoConfig.from_pretrained() 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.
- Record
CVE-2026-5241- CVSS 3.1
- 7.7 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N - Weakness
- CWE-829
- Updated
- 2026-11-02
OSVGHSA-fgcw-684q-jj6r
8.0
huggingface/transformers: Arbitrary Code Execution During Model Initialization in the LightGlue Model Loading Path
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 trust_remote_code 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.from_pretrained() with trust_remote_code=False, the LightGlueConfig reads the trust_remote_code value from the untrusted config.json file and propagates it into nested AutoConfig.from_pretrained() 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.
- Record
GHSA-fgcw-684q-jj6r- CVSS 3.0
- 8.0 High
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N - Weakness
- CWE-829
- Updated
- 2026-11-02
OSVPYSEC-2026-2290
9.6
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 trust_remote_code 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.from_pretrained() with trust_remote_code=False, the LightGlueConfig reads the trust_remote_code value from the untrusted config.json file and propagates it into nested AutoConfig.from_pretrained() 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.
- Record
PYSEC-2026-2290- CVSS 3.1
- 9.6 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
OSVCLSA-2026-1783991041 No score
TuxCare security update for transformers (1 CVE)
TuxCare rebuilt transformers to address 1 CVE. Fixed in 4.57.6.post3+tuxcare.
- Record
CLSA-2026-1783991041- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
transformersPyPI |
before 5.5.0 | 5.5.0 |
transformersTuxCare:PyPI |
4.57.6 up to 4.57.6.post3+tuxcare, plus listed versions 4.57.6.post1+tuxcare4.57.6.post2+tuxcare |
4.57.6.post3+tuxcare |
transformersPyPI |
before 5.5.0, plus listed versions 0.12.0.02.1.02.1.12.10.0 Show 45 moreShow less2.11.02.2.02.2.12.2.22.3.02.4.02.4.12.5.02.5.12.6.02.7.02.8.02.9.02.9.13.0.03.0.13.0.23.1.03.2.03.3.03.3.13.4.03.5.03.5.14.0.04.0.0rc14.0.14.1.04.1.14.10.04.10.14.10.24.10.34.11.04.11.14.11.24.11.34.12.04.12.14.12.24.12.34.12.44.12.54.13.04.14.0 |
5.5.0 |
transformersPyPI |
through 5.2.0, plus listed versions 0.12.0.02.1.02.1.12.10.0 Show 45 moreShow less2.11.02.2.02.2.12.2.22.3.02.4.02.4.12.5.02.5.12.6.02.7.02.8.02.9.02.9.13.0.03.0.13.0.23.1.03.2.03.3.03.3.13.4.03.5.03.5.14.0.04.0.0rc14.0.14.1.04.1.14.10.04.10.14.10.24.10.34.11.04.11.14.11.24.11.34.12.04.12.14.12.24.12.34.12.44.12.54.13.04.14.0 |
None known |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-02 | created | CVE List, EUVD, GitHub Advisories, NVD, OSV |
References
huntr.com/bounties/ceb3ce1a-4c45-497a-b25e-cb9a7685e619
github.com/huggingface/transformers/commit/676559d5022b74aaa0cee1cee0842b7f27c5320e
access.redhat.com/security/cve/CVE-2026-5241
bugzilla.redhat.com/show_bug.cgi?id=2484384
security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-5241.json
access.redhat.com/errata/RHSA-2026:42644
Show 8 moreShow less
access.redhat.com/errata/RHSA-2026:37275
access.redhat.com/errata/RHSA-2026:34456
access.redhat.com/errata/RHSA-2026:60520
nvd.nist.gov/vuln/detail/CVE-2026-5241
github.com/pypa/advisory-database/tree/main/vulns/transformers/PYSEC-2026-2290.yaml
github.com/advisories/GHSA-fgcw-684q-jj6r
github.com/CVEProject/cvelistV5/tree/main/cves/2026/5xxx/CVE-2026-5241.json
github.com/huggingface/transformers
Left out here: 325 versions. The JSON record has them.