Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 4 fixed, 4 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-829.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| huggingface | huggingface/transformers | before 5.5.0 | 5.5.0 | Patch available | CNA |
| — | transformers (PyPI) | before 5.5.0 | 5.5.0 | Patch available | GHSA-fgcw-684q-jj6r |
- huggingface/transformers Vendorhuggingface Affected before 5.5.0 Fixed in 5.5.0 Patch available CNA
- transformers (PyPI) Vendor— Affected before 5.5.0 Fixed in 5.5.0 Patch available GHSA-fgcw-684q-jj6r
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:huggingface:transformers:5.2.0:*:*:*:*:*:*:* | 5.2.0 | Vulnerable | huggingface |
- cpe:2.3:a:huggingface:transformers:5.2.0:*:*:*:*:*:*:* Versions 5.2.0 Vulnerable ·huggingface
Remediation
- Fix · CNA huggingface/transformers (huggingface) Fixed in 5.5.0
- Fix · GHSA-fgcw-684q-jj6r transformers (PyPI) Fixed in 5.5.0 Advisory →
Red Hat 16 advisories
- RHSA-2026:87410 Released 2026-10-21 · Red Hat rating CriticalRHOAI 2.25.12 - Red Hat OpenShift AI
- Red Hat OpenShift AI 2.25 registry.redhat.io/rhoai/odh-built-in-detector-rhel9, registry.redhat.io/rhoai/odh-caikit-nlp-rhel9, registry.redhat.io/rhoai/odh-codeflare-operator-rhel9 +47
- RHSA-2026:84734 Released 2026-10-19 · Red Hat rating CriticalRHOAI 3.4.5 - Red Hat OpenShift AI
- Red Hat OpenShift AI 3.4 registry.redhat.io/rhoai/odh-ai-gateway-payload-processing-rhel9, registry.redhat.io/rhoai/odh-automl-rhel9, registry.redhat.io/rhoai/odh-autorag-rhel9 +47
- RHSA-2026:70996 Released 2026-09-23 · Red Hat rating ImportantRed Hat AI Inference Model Optimization Tools 3.4.5 (cuda)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/model-opt-cuda-rhel9
Show 13 more Red Hat advisories
- RHSA-2026:70995 Released 2026-09-23 · Red Hat rating ImportantRed Hat AI Inference 3.4.5 (rocm)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/vllm-rocm-rhel9
- RHSA-2026:70979 Released 2026-09-23 · Red Hat rating ImportantRed Hat AI Inference 3.4.5 (cuda)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/vllm-cuda-rhel9
- RHSA-2026:70969 Released 2026-09-23 · Red Hat rating ImportantRed Hat AI Inference 3.4.5 (spyre)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/vllm-spyre-rhel9
- RHSA-2026:70965 Released 2026-09-23 · Red Hat rating ImportantRed Hat AI Inference 3.4.5 (cpu)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/vllm-cpu-rhel9
- RHSA-2026:69469 Released 2026-09-21 · Red Hat rating ImportantRed Hat AI Inference 3.4.5 (rocm)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/vllm-rocm-rhel9
- RHSA-2026:69468 Released 2026-09-21 · Red Hat rating ImportantRed Hat AI Inference Model Optimization Tools 3.4.5 (cuda)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/model-opt-cuda-rhel9
- RHSA-2026:69467 Released 2026-09-21 · Red Hat rating ImportantRed Hat AI Inference 3.4.5 (cuda)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/vllm-cuda-rhel9
- RHSA-2026:69466 Released 2026-09-21 · Red Hat rating ImportantRed Hat AI Inference 3.4.5 (cpu)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/vllm-cpu-rhel9
- RHSA-2026:69464 Released 2026-09-21 · Red Hat rating ImportantRed Hat AI Inference 3.4.5 (spyre)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/vllm-spyre-rhel9
- RHSA-2026:60520 Released 2026-08-27 · Red Hat rating CriticalRHOAI 3.4.4 - Red Hat OpenShift AI
- Red Hat OpenShift AI 3.4 registry.redhat.io/rhoai/odh-automl-rhel9, registry.redhat.io/rhoai/odh-autorag-rhel9, registry.redhat.io/rhoai/odh-built-in-detector-rhel9 +47
- RHSA-2026:42644 Released 2026-07-21 · Red Hat rating ImportantRHOAI 2.25.9 - Red Hat OpenShift AI
- Red Hat OpenShift AI 2.25 registry.redhat.io/rhoai/odh-caikit-tgis-serving-rhel9, registry.redhat.io/rhoai/odh-feature-server-rhel9, registry.redhat.io/rhoai/odh-kserve-storage-initializer-rhel9 +36
- RHSA-2026:37275 Released 2026-07-09 · Red Hat rating CriticalRHOAI 3.3.5 - Red Hat OpenShift AI
- Red Hat OpenShift AI 3.3 registry.redhat.io/rhoai/odh-dashboard-rhel9, registry.redhat.io/rhoai/odh-data-science-pipelines-operator-controller-rhel9, registry.redhat.io/rhoai/odh-feast-operator-rhel9 +45
- RHSA-2026:34456 Released 2026-07-01 · Red Hat rating CriticalRHOAI 3.4.2 - Red Hat OpenShift AI
- Red Hat OpenShift AI 3.4 registry.redhat.io/rhoai/odh-kserve-storage-initializer-rhel9, registry.redhat.io/rhoai/odh-llama-stack-core-rhel9, registry.redhat.io/rhoai/odh-mlserver-rhel9 +33
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat AI Inference Server | Affected | No fix planned: Will not fix |
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | Affected | No fix planned: Will not fix |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet |
| Red Hat AI Inference Server 3.4 | Fixed | RHSA-2026:69464, RHSA-2026:69466, RHSA-2026:69467, RHSA-2026:69468, RHSA-2026:69469, RHSA-2026:70965, RHSA-2026:70969, RHSA-2026:70979, RHSA-2026:70995, RHSA-2026:70996 |
| Red Hat OpenShift AI 2.25 | Fixed | RHSA-2026:42644, RHSA-2026:87410 |
| Red Hat OpenShift AI 3.3 | Fixed | RHSA-2026:37275 |
| Red Hat OpenShift AI 3.4 | Fixed | RHSA-2026:34456, RHSA-2026:60520, RHSA-2026:84734 |
Not affected: 6 products
- OpenShift Lightspeed
- Red Hat Ansible Automation Platform 2
- Red Hat OpenShift AI (RHOAI)
- Red Hat OpenShift AI 2.25
- Red Hat OpenShift AI 3.3
- Red Hat OpenShift AI 3.4
Timeline
- 2026-10-02 Threatist record created from CVE-2026-5241
- 2026-10-03 Alias added: GHSA-fgcw-684q-jj6r
- 2026-10-20 Fix available: RHSA-2026:84734 · Red Hat
- 2026-10-20 Affected versions changed · Red Hat
- 2026-10-22 Fix available: RHSA-2026:87410 · Red Hat
- 2026-10-23 Affected versions changed · Red Hat
- 2026-10-25 EPSS moved to the below the 50th percentile
- 2026-11-06 Fix available: RHSA-2026:42644 · Red Hat
References
Other 8
- https://access.redhat.com/errata/RHSA-2026:34456
- https://access.redhat.com/errata/RHSA-2026:37275
- https://access.redhat.com/errata/RHSA-2026:42644
- https://access.redhat.com/security/cve/CVE-2026-5241
- https://bugzilla.redhat.com/show_bug.cgi?id=2484384
- https://github.com/huggingface/transformers
- https://github.com/pypa/advisory-database/tree/main/vulns/transformers/PYSEC-2026-2290.yaml
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-5241.json
More huggingface Transformers vulnerabilities
- TI-2025-06294 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
- TI-2025-06027 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
- TI-2025-02858 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
- TI-2025-01837 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
- TI-2024-11793 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
- TI-2026-01514 Arbitrary Code Execution via Unsafe torch.load() in Trainer Checkpoint Loading in huggingface/transformers CVSS 3.1HIGH 7.8
Sources
- CVE-2026-5241 · CVE Program
- CVE-2026-5241 · NVD
- FIRST EPSS
- GHSA-fgcw-684q-jj6r · GitHub Advisory Database · CC BY 4.0
- CVE-2026-5241 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences