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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.7
- **CVSS:** 7.7 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: Low; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.94% (percentile 59, 2026-11-26)
- **CWE:** CWE-829
- **Aliases:** GHSA-fgcw-684q-jj6r, PYSEC-2026-2290
- **Published:** 2026-06-03T12:33:10.227Z
- **Modified:** 2026-09-10T03:50:49.345Z

## Who should check

- Projects that depend on PyPI package transformers (\< 5.5.0)
- Anyone running huggingface/transformers \>= unspecified, \< 5.5.0

## 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 and fixed versions

- PyPI `transformers`: affected \< 5.5.0; fixed 5.5.0 (osv)
- huggingface/transformers: \>= unspecified, \< 5.5.0 (cvelist)

## Mitigation

- Upgrade transformers to 5.5.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-5241. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-5241.md
Affected: transformers < 5.5.0
Fixed in: 5.5.0

Steps:
1. Search this machine and project for transformers (PyPI), huggingface/transformers: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-5241 being exploited?

There is no confirmed exploitation: CVE-2026-5241 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.94% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-5241?

High: CVSS 7.7 (v3.1, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-5241?

transformers \< 5.5.0.

### Is there a fix for CVE-2026-5241?

Yes. Fixed in 5.5.0. Upgrade transformers to 5.5.0 or later.

### How do I check if I'm affected by CVE-2026-5241?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://access.redhat.com/errata/RHSA-2026:42644>
- vendor: <https://access.redhat.com/errata/RHSA-2026:37275>
- vendor: <https://access.redhat.com/errata/RHSA-2026:34456>
- vendor: <https://access.redhat.com/errata/RHSA-2026:60520>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-5241>
- vendor: <https://github.com/advisories/GHSA-fgcw-684q-jj6r>
- patch: <https://github.com/huggingface/transformers/commit/676559d5022b74aaa0cee1cee0842b7f27c5320e>
- exploit: <https://huntr.com/bounties/ceb3ce1a-4c45-497a-b25e-cb9a7685e619>
- other: <https://access.redhat.com/security/cve/CVE-2026-5241>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2484384>
- other: <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-5241.json>
- other: <https://github.com/huggingface/transformers>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/transformers/PYSEC-2026-2290.yaml>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-5241>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-fgcw-684q-jj6r> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-2290> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-5241> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-5241>
