CVE-2026-5241
Reported by @huntr_ai · Published June 3, 2026
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.
Risk Scores
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| huggingface | huggingface/transformers | unspecified |
| Red Hat | Red Hat OpenShift AI 3.4 | 1782136276 |
| Red Hat | Red Hat AI Inference Server | |
| Red Hat | Red Hat OpenShift AI (RHOAI) | |
| Red Hat | Red Hat OpenShift AI 3.4 | 1786611435 |
| Red Hat | Red Hat Ansible Automation Platform 2 | |
| Red Hat | Red Hat OpenShift AI 3.4 | 1782135346 |
| Red Hat | Red Hat OpenShift AI (RHOAI) | |
| Red Hat | Red Hat Enterprise Linux AI (RHEL AI) 3 | |
| Red Hat | Red Hat OpenShift AI 3.4 | 1782132167 |
| Red Hat | Red Hat Enterprise Linux AI (RHEL AI) 3 | |
| Red Hat | Red Hat Enterprise Linux AI (RHEL AI) 3 | |
| Red Hat | Red Hat OpenShift AI (RHOAI) | |
| Red Hat | Red Hat OpenShift AI (RHOAI) | |
| Red Hat | Red Hat OpenShift AI 2.25 | 1782475830 |
| Red Hat | Red Hat OpenShift AI (RHOAI) | |
| Red Hat | Red Hat AI Inference Server | |
| Red Hat | Red Hat OpenShift AI 3.3 | 1782991170 |
| Red Hat | Red Hat OpenShift AI 3.4 | 1782135464 |
| Red Hat | Red Hat OpenShift AI (RHOAI) |
…and 72 more
Timeline
- Jun 3, 2026 CVE Published
- Jun 4, 2026 Coalition ESS Score
- Jun 5, 2026 EPSS Score
- Jun 8, 2026 Security Advisory
- Aug 7, 2026 EPSS Score
- Aug 8, 2026 Distribution Patch
- Aug 8, 2026 Distribution Patch
- Aug 8, 2026 Security Advisory
- Aug 8, 2026 Security Advisory
- Aug 20, 2026 Distribution Patch
- Aug 20, 2026 Security Advisory
- Aug 24, 2026 EPSS Score
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-5241 advisory
- https://github.com/advisories/GHSA-fgcw-684q-jj6r advisory
- https://github.com/pypa/advisory-database/tree/main/vulns/transformers/PYSEC-2026-2290.yaml advisory
- https://access.redhat.com/security/cve/CVE-2026-5241 vdb
- RHBZ#2484384 issue
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-5241.json url
- https://access.redhat.com/errata/RHSA-2026:42644 vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:37275 vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:34456 vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:60520 vendor-advisory