CVE-2026-5241: Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers
Vulnerability summary
CVE-2026-5241 is a critical (CVSS 9.6) vulnerability in huggingface huggingface/transformers. EPSS estimates a 0.60% chance of exploitation in the next 30 days, higher than 48.5% of scored vulnerabilities. 1 public exploit is recorded.
Public exploit (reference, Date unknown)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 0 · Related 1Timeline
- 03-06-2026PublishedVulnerability first disclosed.
- 01-09-2026Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
6 scores · 4 sources · 2 versions- CVE.orgCNA7.7HighCVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:NDiffers
- OSV · PypiEcosystem advisory · calculated9.6CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
- OSV · ChainguardEcosystem advisory · calculated7.7HighCVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:NDiffers
- NVDNIST8.0HighCVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
EPSS trend
Probability
0.60%
Chance of exploitation in the next 30 days
Percentile
49%
Versus all other CVEs
30-day change
Decrease -0.34 pp
From 0.94% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundExploit Reference (huntr.com)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard10 products
- nemo< 2.7.3-r11
- py3.10-transformers-4.51All versions (No fix recorded)
- py3.10-transformers-4.56All versions (No fix recorded)
- py3.11-transformers-4.51All versions (No fix recorded)
- py3.11-transformers-4.56All versions (No fix recorded)
Huggingface2 products
- huggingface/transformers≥ unspecified, < 5.5.0
- transformers5.2.0
PyPI1 product
- transformers< 5.5.0 | ≤ 5.2.0
3 vendors · 13 products