# CVE-2026-5241: Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers

> CVE-2026-5241: Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers. CVSS 8.0 (CVSS 3.1).

Canonical: https://rewindex.com/cve/CVE-2026-5241
Last updated: 2026-09-01T12:04:56Z

- Published: 2026-06-03 12:33 UTC · Updated: 2026-09-01 12:04 UTC · Assigner: @huntr\_ai
- CVSS: 8.0 (CVSS 3.1) · Severity: High · Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
- EPSS: 0.60%, 48th percentile (scored 2026-10-25)
- CISA KEV: no
- CWE: CWE-829

## 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.

## Affected vendors and products

- huggingface: huggingface/transformers
- Red Hat: OpenShift Lightspeed
- Red Hat: Red Hat AI Inference Server
- Red Hat: Red Hat Ansible Automation Platform 2
- Red Hat: Red Hat Enterprise Linux AI (RHEL AI) 3
- Red Hat: Red Hat OpenShift AI 2.25
- Red Hat: Red Hat OpenShift AI 3.3
- Red Hat: Red Hat OpenShift AI (RHOAI)

## Tracked companies

- [Hugging Face](https://rewindex.com/company/hugging-face.md)

## References

- [CVE record on cve.org](https://www.cve.org/CVERecord?id=CVE-2026-5241)
- [NVD entry](https://nvd.nist.gov/vuln/detail/CVE-2026-5241)
- [https://github.com/huggingface/transformers/commit/676559d5022b74aaa0cee1cee0842b7f27c5320e](https://github.com/huggingface/transformers/commit/676559d5022b74aaa0cee1cee0842b7f27c5320e)
- [https://huntr.com/bounties/ceb3ce1a-4c45-497a-b25e-cb9a7685e619](https://huntr.com/bounties/ceb3ce1a-4c45-497a-b25e-cb9a7685e619)

---

_Sources: CVE records from the CVE Program (cve.org). CVE® is a registered trademark of The MITRE Corporation. (https://www.cve.org/) This product uses data from the NVD API but is not endorsed or certified by the NVD. (https://nvd.nist.gov/) Known Exploited Vulnerabilities catalog from CISA. (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) EPSS scores from FIRST (Exploit Prediction Scoring System). (https://www.first.org/epss/)_


---
Canonical: https://rewindex.com/cve/CVE-2026-5241 · Markdown: https://rewindex.com/cve/CVE-2026-5241.md · JSON: https://rewindex.com/api/v1/cves/CVE-2026-5241 · Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) · Generated 2026-10-26T02:06:18.090Z
